urldecode() search strings that come in from /search/foo. props SergeyBiryukov. fixes #13961

git-svn-id: http://core.svn.wordpress.org/trunk@21187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-06-30 07:47:22 +00:00
parent 9dca2c6876
commit 8baa55f667
1 changed files with 2 additions and 0 deletions

View File

@ -2177,6 +2177,8 @@ class WP_Query {
if ( !empty($q['s']) ) {
// added slashes screw with quote grouping when done early, so done later
$q['s'] = stripslashes($q['s']);
if ( empty( $_GET['s'] ) && is_main_query() )
$q['s'] = urldecode($q['s']);
if ( !empty($q['sentence']) ) {
$q['search_terms'] = array($q['s']);
} else {