Core Docs | Additional Modules Docs

String.prototype.linkify


@Description: Converts all URLs in a text block into actual html links
@File: String/prototype/linkify.js
@Author: Paul Visco
@Version: 1.0 11/19/07
@Param: String target The target to open the links in, defaults to blank
@Return: String The original text withe links converted to HTML
@Example:
var myString = 'Here http://www.surebert.com is a great javascript toolkit';

var newString = myString.linkify();
//newString = 'Here <a href="http://www.surebert.com" target="_blank">::link::</a> is a great javascript toolkit';