Skip to content

Commit

Permalink
suggesstion issue fix (#4175)
Browse files Browse the repository at this point in the history
  • Loading branch information
esakkiraja100116 authored and ssddanbrown committed Apr 27, 2023
1 parent 8cd6c79 commit 78fecdf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Search/SearchRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ protected function applyTermSearch(EloquentBuilder $entityQuery, SearchOptions $
$subQuery->where('entity_type', '=', $entity->getMorphClass());
$subQuery->where(function (Builder $query) use ($terms) {
foreach ($terms as $inputTerm) {
$inputTerm = (strpos($inputTerm, "\\") !== false) ? str_replace("\\", "\\\\", $inputTerm) : $inputTerm;
$query->orWhere('term', 'like', $inputTerm . '%');
}
});
Expand Down

0 comments on commit 78fecdf

Please sign in to comment.