Ticket #8300: wp-includes--formatting.php.diff
| File wp-includes--formatting.php.diff, 953 bytes (added by josephscott, 4 years ago) |
|---|
-
wp-includes/formatting.php
1035 1035 function make_clickable($ret) { 1036 1036 $ret = ' ' . $ret; 1037 1037 // in testing, using arrays here was found to be faster 1038 $ret = preg_replace_callback('#([\s>])([\w]+?://[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\] +]*)#is', '_make_url_clickable_cb', $ret);1038 $ret = preg_replace_callback('#([\s>])([\w]+?://[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]()+]*)#is', '_make_url_clickable_cb', $ret); 1039 1039 $ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_web_ftp_clickable_cb', $ret); 1040 1040 $ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret); 1041 1041 // this one is not in an array because we need it to run last, for cleanup of accidental links within links
