This fork aggregates work from two other forks. It also fixes an caused when linkify is given a string with no links in it.
Updated the Top Level Domain list.
linkify('@mahemoff', { twitter: true })
becomes: @mahemoff
In doing so, there's some refactoring to simplify the way the uber URI regexp is built up. There's also some basic support for Node and a tiny test (in CoffeeScript).
linkify('a.com b.com', { attribs: { target: '_blank' } })
becomes: <a href="http://a.com" title="http://a.com target="_blank' >a.com <a href="http://b.com" title="http://b.com target="_blank' >b.com
Note these links have target='_blank' as an extra attribute, in addition to the regular href and title.
http://benalman.com/projects/javascript-linkify/
Version: 0.3, Last updated: 6/27/2009
Visit the project page for more information and usage examples!
http://benalman.com/code/projects/javascript-linkify/docs/
This working example, complete with fully commented code, illustrates one way in which this code can be used.
http://benalman.com/code/projects/javascript-linkify/examples/linkify/
Information about what browsers this code has been tested in.
Internet Explorer 6-8, Firefox 3-3.5, Safari 3-4, Chrome, Opera 9.
0.3 - (6/27/2009) Initial release
Copyright (c) 2009 "Cowboy" Ben Alman
Dual licensed under the MIT and GPL licenses.
http://benalman.com/about/license/