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
This commit is contained in:
markjaquith 2007-08-30 17:38:47 +00:00
parent fd1fc3f93c
commit 00d289772d
1 changed files with 1 additions and 1 deletions

View File

@ -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');