Active
Project:
Relative Link Filter
Version:
4.6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2006 at 13:49 UTC
Updated:
31 Aug 2006 at 19:43 UTC
Jump to comment: Most recent file
Comments
Comment #1
ac4lt commentedIt appears the problem is on line 21 (I'm using rev. 1.1.2.1). The strlen($dir)+1 shouldn't have the '+1'. That appears to fix it on my site although I haven't tested thoroughly. I'd submit a patch but I'm on a system where I don't have any tools to make one available.
Comment #2
po8 commentedI found the same problem and fixed it the same way. Here's the patch. Would somebody please apply the thing to these bits ASAP?
Comment #3
urbanfalcon commentedFor those who still need this module in 4.7 (if you're feeding content directly in the database, weren't able to get the link update script working in the upgrade, etc.), these are things to consider:
Note that I added "." to the initial exclusions list...if someone had a relative path using dots, the original regex for this filter would totally make a mess of it. I also added a leading slash to the middle two replacements - without them, the paths were being doubled (ie., http://domain/node/node/1234 instead of http://domain/node/1234 - and made the correction already stated above regarding the -1 (which incorrectly turned "node" into "ode"). I realize that going forward, this is all supposedly unnecessary in 4.7, but it's a good tool to have and seems a lot smarter than hard-coding a base href path in the site themes.