mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-13 00:24:42 +08:00
Merge pull request #7602 from rekonder/fix_search
Escape special charecters in global search
This commit is contained in:
commit
d5ec92f2bf
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue