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:
parent
9dca2c6876
commit
8baa55f667
@ -2177,6 +2177,8 @@ class WP_Query {
|
|||||||
if ( !empty($q['s']) ) {
|
if ( !empty($q['s']) ) {
|
||||||
// added slashes screw with quote grouping when done early, so done later
|
// added slashes screw with quote grouping when done early, so done later
|
||||||
$q['s'] = stripslashes($q['s']);
|
$q['s'] = stripslashes($q['s']);
|
||||||
|
if ( empty( $_GET['s'] ) && is_main_query() )
|
||||||
|
$q['s'] = urldecode($q['s']);
|
||||||
if ( !empty($q['sentence']) ) {
|
if ( !empty($q['sentence']) ) {
|
||||||
$q['search_terms'] = array($q['s']);
|
$q['search_terms'] = array($q['s']);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user