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