From b75d9040de6eed104b5888a67552fe3e33524179 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 13 Sep 2018 14:38:18 +1000 Subject: [PATCH] fix stripping of html in conditional replacement --- anki/template/template.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/template/template.py b/anki/template/template.py index 009898976..92f187bfe 100644 --- a/anki/template/template.py +++ b/anki/template/template.py @@ -97,6 +97,8 @@ class Template: replacer = '' inverted = section[2] == "^" + if val: + val = stripHTMLMedia(val).strip() if (val and not inverted) or (not val and inverted): replacer = inner