From c4ead8ad28751c491405a5dc567e069b019309a4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 9 Jun 2020 12:56:16 +1000 Subject: [PATCH] strip out \r on export (private post) https://anki.tenderapp.com/discussions/ankidesktop/42315-bug-report-exporting-selected-cards-in-browser-issue --- pylib/anki/exporting.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pylib/anki/exporting.py b/pylib/anki/exporting.py index 2ed2efad0..e5541bb53 100644 --- a/pylib/anki/exporting.py +++ b/pylib/anki/exporting.py @@ -52,6 +52,7 @@ class Exporter: # fixme: we should probably quote fields with newlines # instead of converting them to spaces text = text.replace("\n", " ") + text = text.replace("\r", "") text = text.replace("\t", " " * 8) text = re.sub("(?i)", "", text) text = re.sub(r"\[\[type:[^]]+\]\]", "", text)