From d3cd671bce1086538c0f26fadaea60d8884845cd Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@19866 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 bc6edea5a..8741d6f9d 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']) ? '' : '%';