also escape ~ char before sending to sphinx
This commit is contained in:
parent
86bafcfd4a
commit
dd860f06e3
|
@ -59,10 +59,8 @@ class Search
|
|||
[]
|
||||
end
|
||||
|
||||
# sphinx seems to interpret slashes as a regex(?) so escape them since
|
||||
# nobody is probably using them, but don't just use Riddle.escape because
|
||||
# it removes boolean suport
|
||||
query = self.q.gsub(/\//, "\\/")
|
||||
# escape sphinx special chars (using Riddle.escape removes boolean support)
|
||||
query = self.q.gsub(/([\/~])/, '\\\\\1')
|
||||
|
||||
# go go gadget search
|
||||
@results = []
|
||||
|
|
Loading…
Reference in a new issue