From 26a3c30365c3d8fc0dfbd7d9782e34131f8f484b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 18 Jul 2013 18:44:40 +0900 Subject: [PATCH] escape + in deck names --- anki/find.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/find.py b/anki/find.py index d246c9e7f..d944ec898 100644 --- a/anki/find.py +++ b/anki/find.py @@ -365,7 +365,9 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds else: # wildcard ids = set() + # should use re.escape in the future val = val.replace("*", ".*") + val = val.replace("+", "\\+") for d in self.col.decks.all(): if re.match("(?i)"+val, d['name']): ids.update(dids(d['id']))