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
This commit is contained in:
parent
e82da3b730
commit
d3cd671bce
|
@ -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']) ? '' : '%';
|
||||
|
|
Loading…
Reference in New Issue