Make WordPress Core

Changeset 5095


Ignore:
Timestamp:
03/23/2007 11:31:44 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r5088 r5095  
    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) )
Note: See TracChangeset for help on using the changeset viewer.