solve missing escape of ' (fixes #1144)

This commit is contained in:
rgreenblatt 2021-04-22 00:52:08 -04:00
parent e3a7d1a9e3
commit c7772794aa

View file

@ -65,7 +65,7 @@ class Exporter:
text = text.replace("\t", " " * 8) text = text.replace("\t", " " * 8)
text = re.sub("(?i)<style>.*?</style>", "", text) text = re.sub("(?i)<style>.*?</style>", "", text)
text = re.sub(r"\[\[type:[^]]+\]\]", "", text) text = re.sub(r"\[\[type:[^]]+\]\]", "", text)
if '"' in text: if '"' in text or "'" in text:
text = '"' + text.replace('"', '""') + '"' text = '"' + text.replace('"', '""') + '"'
return text return text