Linkify ting (exclude emails)

By JoeSimmons Last update Jun 2, 2010 — Installed 10,851 times.

Add your review

3 reviews


5 stars
Great In Opera , Jun 24, 2010
Review written by HardKoreG - see all my reviews (9)

Works great in Opera. Thanks a lot!

0 comments |

1 out of 2 people found this review helpful
4 stars
A few more tweaks you might like to add. , Aug 28, 2009
Review written by stib - see all my reviews (5)

I added |gov|biz|tv|co\.|mil| to the regex There's a few more TLD's but I haven't seen many links like foo.museum, or foo.cat (a TLD for sites dealing with Catalan culture - WTF?). http://en.wikipedia.org/wiki/List_of_Internet_t...

Also I added A-Z in the first part of the regex. People sometimes post URLs with caps in them, and also the % character. so it looks like /\b(?![\@\s]+)(https?:\/\/)?([a-zA-Z0-9%-]+\.)?[a-zA-Z0-9%-]+\.(dk|com|net|org|se|no|nl|us|uk|de|it|nu|tv|biz|gov|mil|edu|info|co\.nr|co\.|to|fr)(\/[^ ]*)?\b/gi

also on line 84 I added
a.setAttribute('target', 'blank');
to make it open the link in a new tab.

0 comments |

2 out of 2 people found this review helpful
3 stars
why not linkify email? , Sep 30, 2011
Review written by atomMan - see all my reviews (4)

not sure why you wouldn't want to linkify emails - i'd rather it did

as it is, it probably shouldn't be linkifying mailto: links, as well as several other protocols which it doesn't support - see:
http://yellow5.us/firefox/testcases.txt

0 comments |