another showDupes fix from ANH

https://forums.ankiweb.net/t/show-duplicates-not-working/2883/10
This commit is contained in:
Damien Elmes 2020-09-04 10:13:30 +10:00
parent 21749a3b0c
commit 0455e760c6

View file

@ -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)