Make WordPress Core

Changeset 4123


Ignore:
Timestamp:
08/30/2006 01:02:45 AM (18 years ago)
Author:
ryan
Message:

Keep the frag at the end. Props mdawaffe. fixes #3078

File:
1 edited

Legend:

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

    r4114 r4123  
    607607    }
    608608
     609    if ( $frag = strstr($uri, '#') )
     610        $uri = substr($uri, 0, -strlen($frag));
     611    else
     612        $frag = '';
     613
    609614    if ( preg_match('|^https?://|i', $uri, $matches) ) {
    610615        $protocol = $matches[0];
     
    646651        }
    647652    }
    648     $ret = $protocol . $base . $ret;
     653    $ret = $protocol . $base . $ret . $frag;
    649654    if ( get_magic_quotes_gpc() )
    650655        $ret = stripslashes($ret); // parse_str() adds slashes if magicquotes is on.  See: http://php.net/parse_str
Note: See TracChangeset for help on using the changeset viewer.