From ed9fba954e5a3d8cca0ef43d3d0ff8ecac804d86 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 11 Apr 2013 18:34:53 +0900 Subject: [PATCH] handle extra attributes in imgs in condition repl (#700) --- anki/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/utils.py b/anki/utils.py index 8fe0e1ee0..fb0a55973 100644 --- a/anki/utils.py +++ b/anki/utils.py @@ -131,7 +131,7 @@ def stripHTML(s): def stripHTMLMedia(s): "Strip HTML but keep media filenames" - s = re.sub("]+)[\"']? ?/?>", " \\1 ", s) + s = re.sub("]+src=[\"']?([^\"'>]+)[\"']?[^>]*>", " \\1 ", s) return stripHTML(s) def minimizeHTML(s):