WordPress.org

Make WordPress Core

Ticket #8904: 8904.patch

File 8904.patch, 539 bytes (added by hakre, 6 years ago)

Yes, ! (Exclamation mark) is a valid and safe char in an URI.

  • wp-includes/pluggable.php

     
    876876 * @return string redirect-sanitized URL 
    877877 **/ 
    878878function wp_sanitize_redirect($location) { 
    879         $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); 
     879        $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%!]|i', '', $location); 
    880880        $location = wp_kses_no_null($location); 
    881881 
    882882        // remove %0d and %0a from location