From 4114ff052f40c372aa9982dc68675a90db68dcea Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Jun 2014 23:08:48 +0000 Subject: [PATCH] Remove free-spacing modifier and extra spaces from wp_extract_urls() pattern. fixes #28222. git-svn-id: https://develop.svn.wordpress.org/trunk@28933 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 6b15c7c49c..8cb08c2891 100644 --- a/src/wp-includes/functions.php +++ b/src/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 );