Version: 0.3, Last updated: 6/27/2009
| JavaScript Linkify: Process links in text! | Version: 0.3, Last updated: 6/27/2009 |
| License | Copyright © 2009 “Cowboy” Ben Alman, Dual licensed under the MIT and GPL licenses. |
| Examples | This working example, complete with fully commented code, illustrates one way in which this code can be used. |
| Support and Testing | Information about what browsers this code has been tested in. |
| Release History | |
| Functions | |
| linkify | Turn text into linkified html. |
Copyright © 2009 “Cowboy” Ben Alman, Dual licensed under the MIT and GPL licenses. http://benalman.com/about/license/
This working example, complete with fully commented code, illustrates one way in which this code can be used.
| Linkify | http://benalman.com |
Turn text into linkified html.
var html = linkify( text [, options ] );
| text | (String) Non-HTML text containing links to be parsed. |
| options | (Object) An optional object containing linkify parse options. |
| callback (Function) | If specified, this will be called once for each link- or non-link-chunk with two arguments, text and href. If the chunk is non-link, href will be omitted. If unspecified, the default linkification callback is used. |
| punct_regexp (RegExp) | A RegExp that will be used to trim trailing punctuation from links, instead of the default. If set to null, trailing punctuation will not be trimmed. |
(String) An HTML string containing links.