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