fix(search): Escape search query properly

This commit is contained in:
Juan Tejada 2016-04-07 09:43:07 -07:00
parent cb46f8a9d8
commit 8d8227a094

View file

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