Make WordPress Core


Ignore:
Timestamp:
06/28/2014 04:15:30 AM (11 years ago)
Author:
wonderboymusic
Message:

wp_extract_urls() should not match dates.

Updates unit tests.

Props hinnerk, sergej.mueller.
Fixes #28222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r28858 r28882  
    442442function wp_extract_urls( $content ) {
    443443    preg_match_all(
    444         "#((?:[\w-]+://?|[\w\d]+[.])[^\s()<>]+[.](?:\([\w\d]+\)|(?:[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|(?:[:]\d+)?/?)+))#",
     444        "#("
     445            . "(?: ([\w-]+:)?//? )"
     446            . "[^\s()<>]+"
     447            . "[.]"
     448            . "(?:"
     449                . "\([\w\d]+\) |"
     450                . "(?:"
     451                    . "[^`!()\[\]{};:'\".,<>?«»“”‘’\s] |"
     452                    . "(?: [:]\d+ )?/?"
     453                . ")+"
     454            . ")"
     455        . ")#x",
    445456        $content,
    446457        $post_links
Note: See TracChangeset for help on using the changeset viewer.