From 5bb09ed77a8a5aa183f532d6dbda5736263450b6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 15 Sep 2014 15:24:50 +0900 Subject: [PATCH] don't add
tags when importing html fixes #1098 --- anki/importing/noteimp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/anki/importing/noteimp.py b/anki/importing/noteimp.py index d53f8a9ac..2b30558e3 100644 --- a/anki/importing/noteimp.py +++ b/anki/importing/noteimp.py @@ -123,7 +123,9 @@ class NoteImporter(Importer): for c in range(len(n.fields)): if not self.allowHTML: n.fields[c] = cgi.escape(n.fields[c]) - n.fields[c] = n.fields[c].strip().replace("\n", "
") + n.fields[c] = n.fields[c].strip() + if not self.allowHTML: + n.fields[c] = n.fields[c].replace("\n", "
") fld0 = n.fields[fld0idx] csum = fieldChecksum(fld0) # first field must exist