diff --git a/anki/exporting.py b/anki/exporting.py index ee484d601..6f4fa9df2 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -8,7 +8,7 @@ Exporting support """ __docformat__ = 'restructuredtext' -import itertools, time +import itertools, time, re from operator import itemgetter from anki import DeckStorage from anki.cards import Card @@ -28,9 +28,10 @@ class Exporter(object): file.close() def escapeText(self, text): - "Escape newlines and tabs." + "Escape newlines and tabs, and strip Anki HTML." text = text.replace("\n", "
") text = text.replace("\t", " " * 8) + text = re.sub('(.*?)', '\\1', text) return text def cardIds(self):