From 00d289772da18e9c7aaf5b896fcbe7ca381b85f9 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Thu, 30 Aug 2007 17:38:47 +0000 Subject: [PATCH] Escape special chars in regex. Props eightize and Otto42. fixes #4873 for 2.2.3 git-svn-id: http://svn.automattic.com/wordpress/branches/2.2@5988 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index b9262ddd98..3440f248b6 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -317,7 +317,7 @@ function wp_redirect($location, $status = 302) { if ( !$location ) // allows the wp_redirect filter to cancel a redirect return false; - $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); + $location = preg_replace('|[^a-z0-9-~\+_\.\?#=&;,/:%]|i', '', $location); $location = wp_kses_no_null($location); $strip = array('%0d', '%0a');