Skip to content

NOW MANAGED ON CODEBERG

suggesstion issue fix (#4175)

esakkiraja10011678fecdfcb011
diff --git a/app/Search/SearchRunner.php b/app/Search/SearchRunner.php
index 013f7b380..d11dcde01 100644
--- a/app/Search/SearchRunner.php
+++ b/app/Search/SearchRunner.php
@@ -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 . '%');
}
});