`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:
parent
2e81419d4c
commit
0e3c4450cb
|
@ -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
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue