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
This commit is contained in:
Andrew Nacin 2012-02-08 15:35:22 +00:00
parent b90754dbca
commit be343dba2c
1 changed files with 1 additions and 1 deletions

View File

@ -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']) ? '' : '%';