mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Escape double quotes in search
This commit is contained in:
parent
06292a45f3
commit
5677a67025
1 changed files with 2 additions and 2 deletions
|
@ -1221,9 +1221,9 @@ QTableView {{ gridline-color: {grid} }}
|
||||||
txt += a + ":"
|
txt += a + ":"
|
||||||
else:
|
else:
|
||||||
txt += re.sub(r"(\*|%|_)", r"\\\1", a)
|
txt += re.sub(r"(\*|%|_)", r"\\\1", a)
|
||||||
for chr in " ()":
|
for chr in ' ()"':
|
||||||
if chr in txt:
|
if chr in txt:
|
||||||
txt = '"%s"' % txt
|
txt = '"%s"' % txt.replace('"', '\\"')
|
||||||
break
|
break
|
||||||
items.append(txt)
|
items.append(txt)
|
||||||
txt = ""
|
txt = ""
|
||||||
|
|
Loading…
Reference in a new issue