mirror of
https://github.com/WordPress/WordPress.git
synced 2024-10-01 00:27:38 +02:00
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:
parent
71151ef2f8
commit
fbca14b458
@ -259,7 +259,7 @@ if ( !function_exists('wp_redirect') ) :
|
|||||||
function wp_redirect($location, $status = 302) {
|
function wp_redirect($location, $status = 302) {
|
||||||
global $is_IIS;
|
global $is_IIS;
|
||||||
|
|
||||||
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
|
$location = preg_replace('|[^a-z0-9-~\+_\.\?#=&;,/:%]|i', '', $location);
|
||||||
|
|
||||||
$strip = array('%0d', '%0a');
|
$strip = array('%0d', '%0a');
|
||||||
$location = str_replace($strip, '', $location);
|
$location = str_replace($strip, '', $location);
|
||||||
|
Loading…
Reference in New Issue
Block a user