foreach ($terms as $key => $term) {
$term = htmlentities($term, ENT_QUOTES);
$term = preg_replace('/[+\-><\(\)~*\"@]+/', ' ', $term);
- if (preg_match('/\s/', $term)) {
+ if (preg_match('/".*?"/', $term)) {
+ $term = str_replace('"', '', $term);
$exactTerms[] = '%' . $term . '%';
$term = '"' . $term . '"';
} else {
return $search->orderBy($orderBy, 'desc');
}
-
+
}