mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Fixes an issue fields are not being escaped in doExport().
This commit is contained in:
parent
7134da4cd6
commit
a83769b258
1 changed files with 3 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue