Urlencode the redirect url for the logout links as well as login in links. Fixes #10991 props Utkarsh.

git-svn-id: https://develop.svn.wordpress.org/trunk@12340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-12-08 16:38:59 +00:00
parent 51e25872a6
commit 073884cb99

View File

@ -166,7 +166,7 @@ function wp_loginout($redirect = '') {
function wp_logout_url($redirect = '') {
$args = array( 'action' => 'logout' );
if ( !empty($redirect) ) {
$args['redirect_to'] = $redirect;
$args['redirect_to'] = urlencode( $redirect );
}
$logout_url = add_query_arg($args, site_url('wp-login.php', 'login'));