mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 11:40:04 +00:00
wp_extract_urls() should not match dates.
Updates unit tests. Props hinnerk, sergej.mueller. Fixes #28222. git-svn-id: https://develop.svn.wordpress.org/trunk@28882 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user