Tracker: Bugs

5 _expandlinks without "www." - ID: 1167663
Last Update: Comment added ( nobody )

Using version 1.2,

I do:

$snoopy->_expandlinks($links, http://domain.com);
and I got:

http:/domain.com/links //notice missing slash

But:
$snoopy->_expandlinks($links, http://www.domain.com); //added
www

works fine.

I think the regex should be:

function _expandlinks($links,$URI)
{

preg_match("/^[^\?]+/",$URI,$match);

THIS: $match = preg_replace("|/[^\/\.]*\.[^\/
\.]+$|","",$match[0]);

INSTEAD of :

$match = preg_replace("|/[^\/\.]+\.[^\/\.]+$|","",$match[0]);

I replace the + before the . with * and it seems to be working for me.


Matt Terenzio ( localnot ) - 2005-03-21 07:26:01 PST

5

Open

None

Nobody/Anonymous

None

None

Public


Comments ( 2 )

Date: 2006-06-05 16:04:17 PDT
Sender: nobody

Logged In: NO

I think, solution is the next

$match =
preg_replace("|[^/]/[^\/\.]*\.[^\/\.]+$|","",$match[0]);



Date: 2005-03-21 08:02:41 PST
Sender: localnot

Logged In: YES
user_id=1243624

UPDATE:

I apologize. My test was flawed. That is not the solution above. The probel

still exists.


Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.