Merge pull request #1145 from rgreenblatt/main

solve missing escape of ' (fixes #1144)
This commit is contained in:
Damien Elmes 2021-04-23 08:53:23 +10:00 committed by GitHub
commit a20606530e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,7 @@ Kerrick Staley <kerrick@kerrickstaley.com>
Maksim Abramchuk <maximabramchuck@gmail.com>
Benjamin Kulnik <benjamin.kulnik@student.tuwien.ac.at>
Shaun Ren <shaun.ren@linux.com>
Ryan Greenblatt <greenblattryan@gmail.com>
********************

View File

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