Link Detection minor error

Found a bug? Tell us!!
Post Reply
singe
Posts: 2
Joined: Tue Jul 27, 2004 9:43 am
Contact:

Link Detection minor error

Post by singe »

If I have the html

<a href="http://foo.com/">'foo bar'</a> then the link is not picked up, either for trackbacks or by the 'Links in this post' module.

If I modify the link to remove the ' then it works fine e.g.
<a href="http://foo.com/">foo bar</a>

Tis but a small error.

--
Serendipity rocks my world
http://singe.rucus.net/
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

Hey, please file a bug on sourceforge :)
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Do you use the latest CVS snapshot? If you are referring to the 'links in this post' module, I guess so?

Our regular expression is this:

Code: Select all

preg_match_all('@<a[^>]+?href\s*=\s*["\']?([^\'" >]+?)[ \'"]?>([^<]*)</a>@i', $text, $matches)
and it does match links with those quotation marks in my test environment. So the current CVS give verbose output on which links it tries to autodetect. Your entered link is not mentioned in this output?
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
singe
Posts: 2
Joined: Tue Jul 27, 2004 9:43 am
Contact:

Sorry for wasting your time

Post by singe »

I can't seem to replicate it. That was rather dumb of me. I apologise for wasting your time.
Post Reply