diff --git a/anki/template/template.py b/anki/template/template.py index 75558f2e2..68a8e3f60 100644 --- a/anki/template/template.py +++ b/anki/template/template.py @@ -1,5 +1,5 @@ import re -from anki.utils import stripHTML +from anki.utils import stripHTML, stripHTMLMedia from anki.hooks import runFilter from anki.template import furigana; furigana.install() from anki.template import hint; hint.install() @@ -99,6 +99,8 @@ class Template(object): replacer = '' # if it and isinstance(it, collections.Callable): # replacer = it(inner) + if isinstance(it, basestring): + it = stripHTMLMedia(it).strip() if it and not hasattr(it, '__iter__'): if section[2] != '^': replacer = inner