mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Merge pull request #769 from abdnh/escape-sidebar-terms
Escape browser sidebar search terms
This commit is contained in:
commit
49ebb193cf
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import html
|
||||
import re
|
||||
import time
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
@ -1219,7 +1220,7 @@ QTableView {{ gridline-color: {grid} }}
|
|||
if c % 2 == 0:
|
||||
txt += a + ":"
|
||||
else:
|
||||
txt += a
|
||||
txt += re.sub(r"(\*|%|_)", r"\\\1", a)
|
||||
for chr in " ()":
|
||||
if chr in txt:
|
||||
txt = '"%s"' % txt
|
||||
|
|
Loading…
Reference in a new issue