mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
suggesstion issue fix (#4175)
This commit is contained in:
committed by
Dan Brown
parent
8cd6c797e8
commit
78fecdfcb0
@ -218,6 +218,7 @@ class SearchRunner
|
|||||||
$subQuery->where('entity_type', '=', $entity->getMorphClass());
|
$subQuery->where('entity_type', '=', $entity->getMorphClass());
|
||||||
$subQuery->where(function (Builder $query) use ($terms) {
|
$subQuery->where(function (Builder $query) use ($terms) {
|
||||||
foreach ($terms as $inputTerm) {
|
foreach ($terms as $inputTerm) {
|
||||||
|
$inputTerm = (strpos($inputTerm, "\\") !== false) ? str_replace("\\", "\\\\", $inputTerm) : $inputTerm;
|
||||||
$query->orWhere('term', 'like', $inputTerm . '%');
|
$query->orWhere('term', 'like', $inputTerm . '%');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user