From effcdff92be4b14b896abfef5da1d8338549326e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 30 Aug 2007 15:42:26 +0000 Subject: [PATCH] Escape special chars in regex. Props eightize and Otto42. fixes #4873 git-svn-id: https://develop.svn.wordpress.org/trunk@5986 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 de94453f03..82ad4ea606 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -398,7 +398,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');