WordPress.org

Make WordPress Core

Changeset 6015


Ignore:
Timestamp:
09/03/2007 03:59:12 PM (13 years ago)
Author:
ryan
Message:

Don't strip @ from url. Fix scheme prefixing. Props pishmishy. fixes #3299

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r5969 r6015  
    10811081
    10821082    if ('' == $url) return $url;
    1083     $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%]|i', '', $url);
     1083    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@]|i', '', $url);
    10841084    $strip = array('%0d', '%0a');
    10851085    $url = str_replace($strip, '', $url);
    10861086    $url = str_replace(';//', '://', $url);
    1087     // Append http unless a relative link starting with / or a php file.
    1088     if ( strpos($url, '://') === false &&
     1087    /* If the URL doesn't appear to contain a scheme, we
     1088     * presume it needs http:// appended (unless a relative
     1089     * link starting with / or a php file).
     1090    */
     1091    if ( strpos($url, ':') === false &&
    10891092        substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9-]+?\.php/i', $url) )
    10901093        $url = 'http://' . $url;
Note: See TracChangeset for help on using the changeset viewer.