Make dupe search operate on non-stripped text

See https://github.com/ankitects/anki/pull/822/
This commit is contained in:
abdo 2020-11-16 04:01:04 +03:00
parent 9f97baa3e2
commit 358d0f957e
2 changed files with 2 additions and 4 deletions

View file

@ -500,9 +500,7 @@ class Editor:
self.web.eval("setBackgrounds(%s);" % json.dumps(cols))
def showDupes(self):
contents = html.escape(
stripHTMLMedia(self.note.fields[0]), quote=False
).replace('"', r"\"")
contents = self.note.fields[0].replace('"', r"\"")
browser = aqt.dialogs.open("Browser", self.mw)
browser.form.searchEdit.lineEdit().setText(
'"dupe:%s,%s"' % (self.note.model()["id"], contents)

View file

@ -432,7 +432,7 @@ impl SqlWriter<'_> {
ntid, csum
)
.unwrap();
self.args.push(text.to_string());
self.args.push(text_nohtml.to_string());
}
fn write_added(&mut self, days: u32) -> Result<()> {