Escape double quotes in search

This commit is contained in:
abdo 2020-10-19 01:06:41 +03:00
parent 06292a45f3
commit 5677a67025

View file

@ -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 = ""