diff --git a/anki/exporting.py b/anki/exporting.py index 2cbdfc53e..f61871d6c 100644 --- a/anki/exporting.py +++ b/anki/exporting.py @@ -20,10 +20,12 @@ class Exporter(object): file.close() def escapeText(self, text): - "Escape newlines, tabs and CSS." + "Escape newlines, tabs, CSS and quotechar." text = text.replace("\n", "
") text = text.replace("\t", " " * 8) text = re.sub("(?i)", "", text) + if "\"" in text: + text = "\"" + text.replace("\"", "\"\"") + "\"" return text def cardIds(self):