Merge pull request #7602 from rekonder/fix_search

Escape special charecters in global search
This commit is contained in:
Martin Artnik 2024-05-29 11:08:57 +02:00 committed by GitHub
commit d5ec92f2bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,6 +155,7 @@ module SearchableModel
current_operator = ''
query.scan(/"[^"]+"|\S+/) do |phrase|
phrase = Regexp.escape(phrase)
phrase = sanitize_sql_like(phrase.strip)
case phrase.downcase