Skip to content

Commit

Permalink
Escape special chars in regex. Props eightize and Otto42. fixes #4873…
Browse files Browse the repository at this point in the history
… for 2.0.12

git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@5989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
markjaquith committed Aug 30, 2007
1 parent 71151ef commit fbca14b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-includes/pluggable-functions.php
Expand Up @@ -259,7 +259,7 @@ function check_ajax_referer() {
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);
Expand Down

0 comments on commit fbca14b

Please sign in to comment.