From f7703c03d3e2fcb8e16f674968e75fade71050bb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Jun 2014 23:09:16 +0000 Subject: [PATCH] Remove free-spacing modifier and extra spaces from wp_extract_urls() pattern. fixes #28222. Built from https://develop.svn.wordpress.org/trunk@28933 git-svn-id: http://core.svn.wordpress.org/trunk@28731 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 6b15c7c49c..8cb08c2891 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -458,17 +458,17 @@ function xmlrpc_removepostdata( $content ) { function wp_extract_urls( $content ) { preg_match_all( "#(" - . "(?: ([\w-]+:)?//? )" + . "(?:([\w-]+:)?//?)" . "[^\s()<>]+" . "[.]" . "(?:" - . "\([\w\d]+\) |" + . "\([\w\d]+\)|" . "(?:" - . "[^`!()\[\]{};:'\".,<>?«»“”‘’\s] |" - . "(?: [:]\d+ )?/?" + . "[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|" + . "(?:[:]\d+)?/?" . ")+" . ")" - . ")#x", + . ")#", $content, $post_links );