diff options
| author | 2022-03-21 12:51:03 +0100 | |
|---|---|---|
| committer | 2022-03-21 12:51:03 +0100 | |
| commit | 4d153eeaf85905e8402cc8d175f202967d909020 (patch) | |
| tree | 194ea90f602899d25be4243f188e10c3b13d6fda /app/Models/BooleanSearch.php | |
| parent | a89fce27cbc3f3cdfe0cbc10f1ba63a85efa8ebb (diff) | |
Fix some search expressions (#4277)
* Fix some search expressions
* Fix decoding bug when using quotes to search free text containing some spaces such as `"ab cd"`
* Fix use of `-` wrongly triggering a negative search in e.g. `ab-cd`
* Fix edge cases
* A couple of tests
Diffstat (limited to 'app/Models/BooleanSearch.php')
| -rw-r--r-- | app/Models/BooleanSearch.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.php index 88eeea73c..e2f99d524 100644 --- a/app/Models/BooleanSearch.php +++ b/app/Models/BooleanSearch.php @@ -16,6 +16,7 @@ class FreshRSS_BooleanSearch { $this->raw_input = $input; $input = preg_replace('/:"(.*?)"/', ':"\1"', $input); + $input = preg_replace('/(?<=[\s!-]|^)"(.*?)"/', '"\1"', $input); $splits = preg_split('/\b(OR)\b/i', $input, -1, PREG_SPLIT_DELIM_CAPTURE); $segment = ''; |
