WordPress.org

Make WordPress Core

Changeset 5193


Ignore:
Timestamp:
04/06/2007 04:21:21 AM (11 years ago)
Author:
rob1n
Message:

Re-encode query values after passed to add_query_arg(). Props mdawaffe. fixes #4084

File:
1 edited

Legend:

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

    r5178 r5193  
    816816    foreach($qs as $k => $v) {
    817817        if ( $v !== FALSE ) {
     818            $v = rawurlencode($v);
    818819            if ( $ret != '' )
    819820                $ret .= '&';
     
    824825        }
    825826    }
     827    $ret = trim($ret, '?');
    826828    $ret = $protocol . $base . $ret . $frag;
    827829    if ( get_magic_quotes_gpc() )
    828830        $ret = stripslashes($ret); // parse_str() adds slashes if magicquotes is on.  See: http://php.net/parse_str
    829     return trim($ret, '?');
     831    return $ret;
    830832}
    831833
Note: See TracChangeset for help on using the changeset viewer.