Fixes an issue fields are not being escaped in doExport().

This commit is contained in:
rubyu 2014-05-21 14:52:43 +09:00
parent 7134da4cd6
commit a83769b258

View file

@ -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", "<br>")
text = text.replace("\t", " " * 8)
text = re.sub("(?i)<style>.*?</style>", "", text)
if "\"" in text:
text = "\"" + text.replace("\"", "\"\"") + "\""
return text
def cardIds(self):