From 0455e760c6e94e383a9d3b52973f2241f9920996 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 4 Sep 2020 10:13:30 +1000 Subject: [PATCH] another showDupes fix from ANH https://forums.ankiweb.net/t/show-duplicates-not-working/2883/10 --- qt/aqt/editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 2735a0b05..05d57d507 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -493,7 +493,9 @@ class Editor: self.web.eval("setBackgrounds(%s);" % json.dumps(cols)) def showDupes(self): - contents = html.escape(stripHTMLMedia(self.note.fields[0])) + contents = html.escape( + stripHTMLMedia(self.note.fields[0]), quote=False + ).replace('"', r"\"") browser = aqt.dialogs.open("Browser", self.mw) browser.form.searchEdit.lineEdit().setText( '"dupe:%s,%s"' % (self.note.model()["id"], contents)