Possible Duplicate:
How to replace plain URLs with links?
So I’ve got a page with a bunch of URLs and no links. The page is constantly pulling in new information, so I can’t add the tags myself. Where could I find a fast, lightweight, JavaScript snippet or jQuery plugin to linkify these URLs?
Turn http://blahblah.com/
into <a href="http://blahblah.com/">http://blahblah.com/</a>
With JQuery:
Assuming your links are in p (for performance, use the closest selector)
Surely not the most optimized way, and the regex is not really well-formed but at least it doesn’t replaces URLs that are in tags attributes (like images src).