From 0b294b948152a6dbda1660114696eede75ba1467 Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sat, 30 Jun 2012 07:47:22 +0000 Subject: [PATCH] urldecode() search strings that come in from /search/foo. props SergeyBiryukov. fixes #13961 git-svn-id: https://develop.svn.wordpress.org/trunk@21187 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index 5f6ccddfb8..68093b69b5 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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 {