WordPress.org

Make WordPress Core

Ticket #11471: 11471-simple.diff

File 11471-simple.diff, 763 bytes (added by nacin, 4 years ago)

Alternative: Just urlencode() it and move along.

  • edit-comments.php

     
    103103        if ( !empty($_REQUEST['comment_status']) ) 
    104104                $redirect_to = add_query_arg('comment_status', $_REQUEST['comment_status'], $redirect_to); 
    105105        if ( !empty($_REQUEST['s']) ) 
    106                 $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); 
     106                $redirect_to = add_query_arg('s', urlencode($_REQUEST['s']), $redirect_to); 
    107107        wp_redirect( $redirect_to ); 
     108        exit; 
    108109} elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 
    109110         wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 
    110111         exit;