Make WordPress Core

Ticket #20383: 20383.patch

File 20383.patch, 659 bytes (added by joostdevalk, 10 years ago)
  • wp-includes/canonical.php

     
    342342        $redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
    343343
    344344        // Remove trailing spaces from the path
    345         $redirect['path'] = preg_replace( '#(%20| )+$#', '', $redirect['path'] );
     345        $redirect['path'] = preg_replace( '#(%20|%22|%7B| |\)|!|,|;|\')+$#', '', $redirect['path'] );
    346346
    347347        if ( !empty( $redirect['query'] ) ) {
    348348                // Remove trailing spaces from certain terminating query string args