From 197d665de8643db8897c64a17e42938505d70383 Mon Sep 17 00:00:00 2001 From: abdo Date: Mon, 14 Dec 2020 15:07:28 +0300 Subject: [PATCH] Fix duplicate check not decoding entities This is a regression introduced in 358d0f957ee91aae7417b49570355d75790f910e See https://forums.ankiweb.net/t/bug-duplicates-not-detecting-on-paste/5753 --- rslib/src/text.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rslib/src/text.rs b/rslib/src/text.rs index d6117345f..0f892ecd0 100644 --- a/rslib/src/text.rs +++ b/rslib/src/text.rs @@ -215,7 +215,7 @@ fn tts_tag_from_string<'a>(field_text: &'a str, args: &'a str) -> AVTag { pub fn strip_html_preserving_media_filenames(html: &str) -> Cow { let without_fnames = HTML_MEDIA_TAGS.replace_all(html, r" ${1}${2}${3} "); - let without_html = HTML.replace_all(&without_fnames, ""); + let without_html = strip_html(&without_fnames); // no changes? if let Cow::Borrowed(b) = without_html { if ptr::eq(b, html) {