Exclamation mark is a valid and safe character in a URI. props hakre. fixes #8904
git-svn-id: https://develop.svn.wordpress.org/trunk@11147 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1ef2a296d9
commit
4569581d73
@ -876,7 +876,7 @@ if ( !function_exists('wp_sanitize_redirect') ) :
|
||||
* @return string redirect-sanitized URL
|
||||
**/
|
||||
function wp_sanitize_redirect($location) {
|
||||
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
|
||||
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location);
|
||||
$location = wp_kses_no_null($location);
|
||||
|
||||
// remove %0d and %0a from location
|
||||
|
Loading…
Reference in New Issue
Block a user