mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
escape + in deck names
This commit is contained in:
parent
6f66f11572
commit
26a3c30365
1 changed files with 2 additions and 0 deletions
|
@ -365,7 +365,9 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||||
else:
|
else:
|
||||||
# wildcard
|
# wildcard
|
||||||
ids = set()
|
ids = set()
|
||||||
|
# should use re.escape in the future
|
||||||
val = val.replace("*", ".*")
|
val = val.replace("*", ".*")
|
||||||
|
val = val.replace("+", "\\+")
|
||||||
for d in self.col.decks.all():
|
for d in self.col.decks.all():
|
||||||
if re.match("(?i)"+val, d['name']):
|
if re.match("(?i)"+val, d['name']):
|
||||||
ids.update(dids(d['id']))
|
ids.update(dids(d['id']))
|
||||||
|
|
Loading…
Reference in a new issue