Active
Project:
URL Icon
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 May 2010 at 17:50 UTC
Updated:
18 Nov 2011 at 15:12 UTC
I am finding the external icon added to internal links when the href is absolute, even though they are internal to the site.
Comments
Comment #1
funkytraffic commentedThis is a mismatch in the regular expression
$reg_exp = '/<a.+?href=\"((http|https|ftp|telnet|news|mms):\/\/.+?)\"[^>]*>(.+?)<\/a>/i';must be replaced by (any amount of space)
$reg_exp = '/<a\x20+?href=\"((http|https|ftp|telnet|news|mms):\/\/.+?)\"[^>]*>(.+?)<\/a>/i';or maybe even better (any character but closing the tag)
$reg_exp = '/<a[^>]+?href=\"((http|https|ftp|telnet|news|mms):\/\/.+?)\"[^>]*>(.+?)<\/a>/i';because
<a.+?hrefwill match
<a href="/internal"></a> any text lines <a href="http://external.com">