3 reviews
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
Works great in Opera. Thanks a lot!
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.