mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
escape () in field search
This commit is contained in:
parent
36f5fd0e4c
commit
320cf05a51
1 changed files with 1 additions and 1 deletions
|
@ -406,7 +406,7 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
||||||
# nothing has that field
|
# nothing has that field
|
||||||
return
|
return
|
||||||
# gather nids
|
# gather nids
|
||||||
regex = val.replace("_", ".").replace("%", ".*")
|
regex = re.escape(val).replace("\\_", ".").replace("\\%", ".*")
|
||||||
nids = []
|
nids = []
|
||||||
for (id,mid,flds) in self.col.db.execute("""
|
for (id,mid,flds) in self.col.db.execute("""
|
||||||
select id, mid, flds from notes
|
select id, mid, flds from notes
|
||||||
|
|
Loading…
Reference in a new issue