From be343dba2c034a62fe4be09dbd4f52f6e6788a52 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 8 Feb 2012 15:35:22 +0000 Subject: [PATCH] Use [\r\n\t ], not [\s], to prevent issues with some UTF-8 characters. props SergeyBiryukov, fixes #19033. git-svn-id: https://develop.svn.wordpress.org/trunk@19866 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index bc6edea5ac..8741d6f9df 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2180,7 +2180,7 @@ class WP_Query { if ( !empty($q['sentence']) ) { $q['search_terms'] = array($q['s']); } else { - preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches); + preg_match_all('/".*?("|$)|((?<=[\r\n\t ",+])|^)[^\r\n\t ",+]+/', $q['s'], $matches); $q['search_terms'] = array_map('_search_terms_tidy', $matches[0]); } $n = !empty($q['exact']) ? '' : '%';