Eliminate double urlencode()ing in add_query_arg(). Move &-to-& conversion to wp_nonce_url(). fixes #4884

git-svn-id: https://develop.svn.wordpress.org/trunk@6008 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-02 05:49:54 +00:00
parent 71820cb422
commit d0d887d09d
1 changed files with 1 additions and 3 deletions

View File

@ -606,8 +606,6 @@ function add_query_arg() {
$uri = @func_get_arg(2); $uri = @func_get_arg(2);
} }
$uri = str_replace('&', '&', $uri);
if ( $frag = strstr($uri, '#') ) if ( $frag = strstr($uri, '#') )
$uri = substr($uri, 0, -strlen($frag)); $uri = substr($uri, 0, -strlen($frag));
else else
@ -638,7 +636,6 @@ function add_query_arg() {
} }
wp_parse_str($query, $qs); wp_parse_str($query, $qs);
$qs = urlencode_deep($qs);
if ( is_array(func_get_arg(0)) ) { if ( is_array(func_get_arg(0)) ) {
$kayvees = func_get_arg(0); $kayvees = func_get_arg(0);
$qs = array_merge($qs, $kayvees); $qs = array_merge($qs, $kayvees);
@ -853,6 +850,7 @@ function is_blog_installed() {
} }
function wp_nonce_url($actionurl, $action = -1) { function wp_nonce_url($actionurl, $action = -1) {
$actionurl = str_replace('&', '&', $actionurl);
return wp_specialchars(add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl)); return wp_specialchars(add_query_arg('_wpnonce', wp_create_nonce($action), $actionurl));
} }