Strip trailing spaces in URLs, redirect to canonical URL. fixes #7537

git-svn-id: https://develop.svn.wordpress.org/trunk@8667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-08-19 03:21:12 +00:00
parent f104c612cb
commit 71632ab8c7
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -524,6 +524,8 @@ class WP_Query {
$qv['w'] = absint($qv['w']);
$qv['m'] = absint($qv['m']);
$qv['cat'] = preg_replace( '|[^0-9,-]|', '', $qv['cat'] ); // comma separated list of positive or negative integers
$qv['pagename'] = trim( $qv['pagename'] );
$qv['name'] = trim( $qv['name'] );
if ( '' !== $qv['hour'] ) $qv['hour'] = absint($qv['hour']);
if ( '' !== $qv['minute'] ) $qv['minute'] = absint($qv['minute']);
if ( '' !== $qv['second'] ) $qv['second'] = absint($qv['second']);