More thorough URI sanitizer in wp_redirect().

git-svn-id: https://develop.svn.wordpress.org/trunk@3926 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-06-27 01:42:52 +00:00
parent 9326bca8f3
commit 7028e093b6

View File

@ -283,7 +283,7 @@ if ( !function_exists('wp_redirect') ) :
function wp_redirect($location) {
global $is_IIS;
$location = str_replace( array("\n", "\r"), '', $location);
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $location);
if ($is_IIS)
header("Refresh: 0;url=$location");