Skip to content

Commit ba0b9ce

Browse files
committed
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
1 parent 3454487 commit ba0b9ce

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

wp-includes/formatting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ function _make_email_clickable_cb($matches) {
13791379
function make_clickable($ret) {
13801380
$ret = ' ' . $ret;
13811381
// in testing, using arrays here was found to be faster
1382-
$ret = preg_replace_callback('#(?<=[\'*)+.,;:!=&$\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#%~/?@\[\]-]|[\'*(+.,;:!=&$](?![\s<\b]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
1382+
$ret = preg_replace_callback('#(?<=[\s>])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/=?@\[\](!+-]|[.,;:](?![\s<]|(\))?([\s]|$))|(?(1)\)(?![\s<.,;:]|$)|\)))+)#is', '_make_url_clickable_cb', $ret);
13831383
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret);
13841384
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
13851385
// this one is not in an array because we need it to run last, for cleanup of accidental links within links

0 commit comments

Comments
 (0)