WordPress.org

Make WordPress Core

Ticket #28222: scheme-less.functions.php.patch

File scheme-less.functions.php.patch, 417 bytes (added by sergej.mueller, 7 years ago)

URL scheme-less check

  • functions.php

     
    441441 */
    442442function wp_extract_urls( $content ) {
    443443        preg_match_all(
    444                 "#((?:[\w-]+://?|[\w\d]+[.])[^\s()<>]+[.](?:\([\w\d]+\)|(?:[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|(?:[:]\d+)?/?)+))#",
     444                "#((?:([\w-]+:)?//?)[^\s()<>]+[.](?:\([\w\d]+\)|(?:[^`!()\[\]{};:'\".,<>?«»“”‘’\s]|(?:[:]\d+)?/?)+))#",
    445445                $content,
    446446                $post_links
    447447        );