Fix href quoting. Bug 532. Hat Tip: MooKitty.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-12-24 21:00:06 +00:00
parent e8d51ff0d0
commit 8790a95eeb
1 changed files with 1 additions and 1 deletions

View File

@ -499,7 +499,7 @@ function make_clickable($ret) { // original function: phpBB
$ret = ' ' . $ret . ' ';
$ret = preg_replace("#(\s)http://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='http://$2'>http://$2</a>", $ret);
$ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4'>www.$2.$3$4</a>", $ret);
$ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a href='mailto:$2@$3\">$2@$3</a>", $ret);
$ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3\">$2@$3</a>", $ret);
$ret = trim($ret);
return $ret;
}