From 073884cb9996a8af27e686b9782263cd4a6b5f70 Mon Sep 17 00:00:00 2001
From: Peter Westwood <westi@git.wordpress.org>
Date: Tue, 8 Dec 2009 16:38:59 +0000
Subject: [PATCH] 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
---
 wp-includes/general-template.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index cc361f7638..121b8a6c89 100644
--- a/wp-includes/general-template.php
+++ b/wp-includes/general-template.php
@@ -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'));