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:
parent
fd1fc3f93c
commit
00d289772d
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue