Index: wp-includes/canonical.php
===================================================================
--- wp-includes/canonical.php	(revision 25620)
+++ wp-includes/canonical.php	(working copy)
@@ -342,7 +342,7 @@
 	$redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']);
 
 	// Remove trailing spaces from the path
-	$redirect['path'] = preg_replace( '#(%20| )+$#', '', $redirect['path'] );
+	$redirect['path'] = preg_replace( '#(%20|%22|%7B| |\)|!|,|;|\')+$#', '', $redirect['path'] );
 
 	if ( !empty( $redirect['query'] ) ) {
 		// Remove trailing spaces from certain terminating query string args
