Ticket #31499: 31499.diff
File 31499.diff, 727 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/canonical.php
83 83 if ( !isset($redirect['query']) ) 84 84 $redirect['query'] = ''; 85 85 86 // If the original URL ended with non-breaking spaces, they were almost 87 // certainly inserted by accident. Let's remove them, so the reader doesn't 88 // see a 404 method with no obvious cause. 89 $redirect['path'] = preg_replace( '|(%C2%A0)+$|i', '', $redirect['path'] ); 90 86 91 // It's not a preview, so remove it from URL 87 92 if ( get_query_var( 'preview' ) ) { 88 93 $redirect['query'] = remove_query_arg( 'preview', $redirect['query'] );