From c7772794aabb1b453bfe56d4b92c861e402b10f7 Mon Sep 17 00:00:00 2001 From: rgreenblatt Date: Thu, 22 Apr 2021 00:52:08 -0400 Subject: [PATCH] solve missing escape of ' (fixes #1144) --- pylib/anki/exporting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylib/anki/exporting.py b/pylib/anki/exporting.py index 3034c7fd1..9b5f15986 100644 --- a/pylib/anki/exporting.py +++ b/pylib/anki/exporting.py @@ -65,7 +65,7 @@ class Exporter: text = text.replace("\t", " " * 8) text = re.sub("(?i)", "", text) text = re.sub(r"\[\[type:[^]]+\]\]", "", text) - if '"' in text: + if '"' in text or "'" in text: text = '"' + text.replace('"', '""') + '"' return text