diff --git a/wp-includes/functions.php b/wp-includes/functions.php index bc8135a1b4..d238e3c0b9 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -441,7 +441,18 @@ function xmlrpc_removepostdata( $content ) { */ function wp_extract_urls( $content ) { preg_match_all( - "#((?:[\w-]+://?|[\w\d]+[.])[^\s()<>]+[.](?:\([\w\d]+\)|(?:[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|(?:[:]\d+)?/?)+))#", + "#(" + . "(?: ([\w-]+:)?//? )" + . "[^\s()<>]+" + . "[.]" + . "(?:" + . "\([\w\d]+\) |" + . "(?:" + . "[^`!()\[\]{};:'\".,<>?«»“”‘’\s] |" + . "(?: [:]\d+ )?/?" + . ")+" + . ")" + . ")#x", $content, $post_links );