1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

suggesstion issue fix (#4175)

This commit is contained in:
esakkiraja100116
2023-04-26 22:19:16 +05:30
committed by Dan Brown
parent 8cd6c797e8
commit 78fecdfcb0

View File

@ -218,6 +218,7 @@ class SearchRunner
$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 . '%');
}
});