fix(search): Escape search query properly

This commit is contained in:
Juan Tejada 2016-04-07 09:43:07 -07:00
parent c0d9915318
commit 76ccab606e

View file

@ -208,8 +208,13 @@ class NotCompositeMatcher extends Matcher
return "NOT (" + wheres.join(" AND ") + ")" return "NOT (" + wheres.join(" AND ") + ")"
class SearchMatcher extends Matcher class SearchMatcher extends Matcher
constructor: (@searchQuery) -> constructor: (searchQuery) ->
super(null, null, null) super(null, null, null)
@searchQuery = (
searchQuery.trim()
.replace(/^['"]/, "")
.replace(/['"]$/, "")
)
@ @
attribute: => attribute: =>