Changeset 6015

Show
Ignore:
Timestamp:
09/03/07 15:59:12 (1 year ago)
Author:
ryan
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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;