Escape special chars in regex. Props eightize and Otto42. fixes #4873 for 2.0.12

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-08-30 17:43:27 +00:00
parent 71151ef2f8
commit fbca14b458

View File

@ -259,7 +259,7 @@ if ( !function_exists('wp_redirect') ) :
function wp_redirect($location, $status = 302) {
global $is_IIS;
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
$location = preg_replace('|[^a-z0-9-~\+_\.\?#=&;,/:%]|i', '', $location);
$strip = array('%0d', '%0a');
$location = str_replace($strip, '', $location);