Make work with https URIs
git-svn-id: https://develop.svn.wordpress.org/trunk@2008 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fe196958e6
commit
7a8c7eb2e3
|
@ -495,9 +495,9 @@ function antispambot($emailaddy, $mailto=0) {
|
||||||
return $emailNOSPAMaddy;
|
return $emailNOSPAMaddy;
|
||||||
}
|
}
|
||||||
|
|
||||||
function make_clickable($ret) { // original function: phpBB
|
function make_clickable($ret) {
|
||||||
$ret = ' ' . $ret . ' ';
|
$ret = ' ' . $ret . ' ';
|
||||||
$ret = preg_replace("#(\s)http://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='http://$2'>http://$2</a>", $ret);
|
$ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='$2://$3'>$2://$3</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)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);
|
$ret = trim($ret);
|
||||||
|
|
Loading…
Reference in New Issue