From a83769b258ef1c8fb310122aec3c19d605788c29 Mon Sep 17 00:00:00 2001 From: rubyu Date: Wed, 21 May 2014 14:52:43 +0900 Subject: [PATCH] Fixes an issue fields are not being escaped in doExport(). --- anki/exporting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):