mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Merge pull request #798 from abdnh/escape-quotes-in-search
Escape double quotes in search
This commit is contained in:
commit
fe5c4a2593
1 changed files with 2 additions and 2 deletions
|
@ -1211,9 +1211,9 @@ QTableView {{ gridline-color: {grid} }}
|
|||
txt += a + ":"
|
||||
else:
|
||||
txt += re.sub(r"(\*|%|_)", r"\\\1", a)
|
||||
for chr in " ()":
|
||||
for chr in ' ()"':
|
||||
if chr in txt:
|
||||
txt = '"%s"' % txt
|
||||
txt = '"%s"' % txt.replace('"', '\\"')
|
||||
break
|
||||
items.append(txt)
|
||||
txt = ""
|
||||
|
|
Loading…
Reference in a new issue