From 21749a3b0cafc989bcd36978d7512c1d1520f5c7 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 4 Sep 2020 09:36:18 +1000 Subject: [PATCH] sound tags need filename html escaped https://forums.ankiweb.net/t/unable-to-play-longer-audio-on-cards/1313/30 --- qt/aqt/editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index eb587f00a..2735a0b05 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -761,7 +761,7 @@ to a cloze type first, via 'Notes>Change Note Type'""" return '' % name else: av_player.play_file(fname) - return "[sound:%s]" % fname + return "[sound:%s]" % html.escape(fname, quote=False) def urlToFile(self, url: str) -> Optional[str]: l = url.lower()