Revert 16150 - breaks things more than it fixes things. See #14993
git-svn-id: https://develop.svn.wordpress.org/trunk@16151 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3454487449
commit
ba0b9ce455
|
@ -1379,7 +1379,7 @@ function _make_email_clickable_cb($matches) {
|
||||||
function make_clickable($ret) {
|
function make_clickable($ret) {
|
||||||
$ret = ' ' . $ret;
|
$ret = ' ' . $ret;
|
||||||
// in testing, using arrays here was found to be faster
|
// in testing, using arrays here was found to be faster
|
||||||
$ret = preg_replace_callback('#(?<=[\'*)+.,;:!=&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]|[\'*(+.,;:!=&$](?![\s<\b]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
|
$ret = preg_replace_callback('#(?<=[\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/=?@\[\](!+-]|[.,;:](?![\s<]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
|
||||||
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
|
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
|
||||||
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
|
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
|
||||||
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
|
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
|
||||||
|
|
Loading…
Reference in New Issue