Allow special characters to be escaped
This commit is contained in:
parent
97f280923c
commit
491b8ea63f
@ -246,10 +246,10 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
|||||||
val = val.replace("*", "%")
|
val = val.replace("*", "%")
|
||||||
if not val.startswith("%"):
|
if not val.startswith("%"):
|
||||||
val = "% " + val
|
val = "% " + val
|
||||||
if not val.endswith("%"):
|
if not val.endswith("%") or val.endswith('\\%'):
|
||||||
val += " %"
|
val += " %"
|
||||||
args.append(val)
|
args.append(val)
|
||||||
return "n.tags like ?"
|
return "n.tags like ? escape '\\'"
|
||||||
|
|
||||||
def _findCardState(self, args):
|
def _findCardState(self, args):
|
||||||
(val, args) = args
|
(val, args) = args
|
||||||
|
Loading…
Reference in New Issue
Block a user