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
This commit is contained in:
parent
46fcc70168
commit
effcdff92b
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user