Show
Ignore:
Timestamp:
03/23/07 23:32:14 (2 years ago)
Author:
ryan
Message:

Fix relative link mangling in clean_url. fixes #4017 for 2.1

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.1/wp-includes/formatting.php

    r5091 r5096  
    10751075    // Append http unless a relative link starting with / or a php file. 
    10761076    if ( strpos($url, '://') === false && 
    1077         substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9]+.php/i', $url) ) 
     1077        substr( $url, 0, 1 ) != '/' && !preg_match('/^[a-z0-9]+?\.php/i', $url) ) 
    10781078        $url = 'http://' . $url; 
    10791079     
    1080     $url = (strpos($url, '://') === false && substr( $url, 0, 1 ) != '/' ) ? 'http://'.$url : $url; 
    10811080    $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 
    10821081    if ( !is_array($protocols) )