Eliminate double urlencode()ing in add_query_arg(). Move &-to-& conversion to wp_nonce_url(). fixes #4884
git-svn-id: http://svn.automattic.com/wordpress/trunk@6008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e26363a568
commit
7e45ed193a
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue