]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
8cd6c79
)
suggesstion issue fix (#4175)
author
esakkiraja100116
<redacted>
Wed, 26 Apr 2023 16:49:16 +0000
(22:19 +0530)
committer
Dan Brown
<redacted>
Thu, 27 Apr 2023 15:32:39 +0000
(16:32 +0100)
app/Search/SearchRunner.php
patch
|
blob
|
history
diff --git
a/app/Search/SearchRunner.php
b/app/Search/SearchRunner.php
index 013f7b380b82239e8ce475b63d8efa52d856db8f..d11dcde01cd423f514f347d5e6ae1820b574c9a0 100644
(file)
--- 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 . '%');
}
});