mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-17 22:42:22 +08:00
Escpace special charachter for search [SCI-10753]
This commit is contained in:
parent
4ee40814f7
commit
96a52f07dd
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ module SearchableModel
|
|||
|
||||
new_phrase = exact_match ? phrase[1..-2] : phrase
|
||||
if DATA_VECTOR_ATTRIBUTES.include?(attribute)
|
||||
new_phrase = Regexp.escape(new_phrase.gsub(/[!()&|:]/, ' ').strip).split(/\s+/)
|
||||
new_phrase = Regexp.escape(new_phrase.gsub(/[!()&|:<]/, ' ').strip).split(/\s+/)
|
||||
new_phrase.map! { |t| "#{t}:*" } unless exact_match
|
||||
new_phrase = new_phrase.join('&').tr('\'', '"')
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue