From d6441cf520e3bc813dfeffba85357918bc527d9a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 24 Nov 2008 23:44:22 +0900 Subject: [PATCH] strip newlines from html edit --- ankiqt/ui/facteditor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 967983163..9a5be27b4 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -486,7 +486,8 @@ class FactEditor(object): form.textEdit.setPlainText(self.widgets[w].value) form.textEdit.moveCursor(QTextCursor.End) d.exec_() - self.widgets[w].value = unicode(form.textEdit.toPlainText()) + self.widgets[w].value = ( + unicode(form.textEdit.toPlainText()).replace("\n", "")) self.loadFields() def fieldsAreBlank(self):