mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -04:00
Fix parenthesis escaping bug (#5633)
fix https://github.com/FreshRSS/FreshRSS/issues/5632 In the SQL search, parentheses should not be escaped. Escaped parenthesis in the SQL search were tolerated by PostgreSQL but not by SQLite.
This commit is contained in:
1 parent
1c7c1016f4
commit
2e1d45a88d
3 files changed
+9
-3
No files matched your search
@@ -73,6 +73,7 @@ class FreshRSS_Search {
|
||||
|
||||
public function __construct(string $input) {
|
||||
$input = self::cleanSearch($input);
|
||||
$input = self::unescape($input);
|
||||
$this->raw_input = $input;
|
||||
|
||||
$input = $this->parseNotEntryIds($input);
|
||||
@@ -662,4 +663,9 @@ class FreshRSS_Search {
|
||||
}
|
||||
return trim($input);
|
||||
}
|
||||
|
||||
/** Remove escaping backslashes for parenthesis logic */
|
||||
private static function unescape(string $input): string {
|
||||
return str_replace(['\\(', '\\)'], ['(', ')'], $input);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user