`wp_extract_urls()` should not match dates.

Updates unit tests.

Props hinnerk, sergej.mueller.
Fixes #28222.

Built from https://develop.svn.wordpress.org/trunk@28882


git-svn-id: http://core.svn.wordpress.org/trunk@28681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-06-28 04:16:14 +00:00
parent 2e81419d4c
commit 0e3c4450cb
1 changed files with 12 additions and 1 deletions

View File

@ -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
);