WordPress.org

Make WordPress Core

Ticket #3250: wp_redirect.diff

File wp_redirect.diff, 560 bytes (added by markjaquith, 8 years ago)

Patch for trunk

  • wp-includes/pluggable.php

     
    256256function wp_redirect($location, $status = 302) { 
    257257        global $is_IIS; 
    258258 
     259        $location = apply_filters('wp_redirect', $location, $status); 
     260 
     261        if ( !$location ) // allows the wp_redirect filter to cancel a redirect 
     262                return false;  
     263 
    259264        $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); 
    260265        $location = wp_kses_no_null($location); 
    261266