From 00e5ef96090ba3dd0e0407927469e4d5d89e324c Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 30 Jun 2006 00:44:21 +0000 Subject: [PATCH] Allow % so entities such as slashes don't break. git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@3940 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index c7bcf10fa4..3198d20075 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -261,7 +261,10 @@ if ( !function_exists('wp_redirect') ) : function wp_redirect($location) { global $is_IIS; - $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $location); + $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); + + $strip = array('%0d', '%0a'); + $location = str_replace($strip, '', $location); if ($is_IIS) header("Refresh: 0;url=$location");