Urlencode the redirect url for the logout links as well as login in links. Fixes #10991 props Utkarsh.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0415ab7b42
commit
5fae5d7d61
|
@ -166,7 +166,7 @@ function wp_loginout($redirect = '') {
|
||||||
function wp_logout_url($redirect = '') {
|
function wp_logout_url($redirect = '') {
|
||||||
$args = array( 'action' => 'logout' );
|
$args = array( 'action' => 'logout' );
|
||||||
if ( !empty($redirect) ) {
|
if ( !empty($redirect) ) {
|
||||||
$args['redirect_to'] = $redirect;
|
$args['redirect_to'] = urlencode( $redirect );
|
||||||
}
|
}
|
||||||
|
|
||||||
$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
|
$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));
|
||||||
|
|
Loading…
Reference in New Issue