URL REGEX needs fine tuning
Reported by Gustavo Carreno | February 26th, 2010 @ 10:18 AM | in 0.8
I've been noticing that your URL regex detection needs some fine
tuning:
Status: http://twitter.com/paulodiovani/status/9640120234
Content: RT @edmundojr_: Olha isso (http://jsmario.com.ar/). Agora me diz: Quem precisa de Flash? #mariojavascript
The link inside the () will have ")." at the end.
Comments and changes to this ticket
-

Gustavo Carreno February 26th, 2010 @ 10:38 AM
Another example:
Status: http://twitter.com/StevenHook/status/9642264608
Content: Dear #Delphi I want my Alt key back. It's not yours to keep!
Link is pointing to %23DelphiI
Strange that it's crossing over a space :(
-

Gustavo Carreno February 26th, 2010 @ 10:40 AM
Hummm, just noticed that the URL link is foobar'ed on this page also.
Could it be Chrome messing up instead?
Maybe for the ")." but not with the hashtags...
Dunno, your call now :P
-

Matt Curry February 26th, 2010 @ 02:50 PM
- State changed from new to open
- Milestone changed from 0.7 to 1.10
I've seen this too. I'm using the CakePHP autolinker (http://api.cakephp.org/view_source/text-helper/#line-106). Looks like there are some issues with it.
-

Gustavo Carreno February 26th, 2010 @ 05:24 PM
Eheheheh. So this little project has proven good to catch a bug on the core. Kewl :)
-

Matt Curry March 2nd, 2010 @ 03:57 AM
- Milestone changed from 1.10 to 0.8
-

Gustavo Carreno March 2nd, 2010 @ 01:18 PM
- Tag set to url highlighting regex
-

Gustavo Carreno March 2nd, 2010 @ 01:22 PM
- Tag changed from url highlighting regex to url highlighting regex, highlighting, regex, url
-

Gustavo Carreno March 2nd, 2010 @ 01:22 PM
- Tag changed from url highlighting regex, highlighting, regex, url to highlighting, regex, url
-

Gustavo Carreno March 4th, 2010 @ 10:04 PM
Here's another case to study:
Status: http://twitter.com/themue/status/9988171653
Content: Friends of mine opened their new online shop: http://www.malts4you.de</ADVERTISEMENT> smile #whisky
Looks like the parenthesis at the end one, it's going greedy on the URL.
-

Matt Curry March 6th, 2010 @ 04:29 AM
- State changed from open to resolved
-

Gustavo Carreno March 11th, 2010 @ 09:59 PM
Hey Matt, sorry to be annoying, but is this in the context of the regex issue?
Satus: http://twitter.com/weierophinney/status/10330715948
Content: RT @bjori: Whoohoo! New #PHP branch created, PHP5.4: http://bit.ly/aLHv7i (#iCanHazTraitsMaybe?)
The hashtag does not have a link.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
-
30
Search highlighting breaks auto-linking
Twitter links: #20couch or @20couch
-
31
Email/twitter auto-linking
This bug may be similar to bug #20 (URL REGEX
needs fine ...
-
30
Search highlighting breaks auto-linking
Replacing SiteHelper::enhanceText() with this should reso...