Fix duplicate check not decoding entities

This is a regression introduced in 35bfd20240

See https://forums.ankiweb.net/t/bug-duplicates-not-detecting-on-paste/5753
This commit is contained in:
abdo 2020-12-14 15:07:28 +03:00
parent 3973266596
commit 45d07275e5

View file

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