From 88c77175374636a930659e9607baf4e473149e3b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 2 Jan 2011 17:10:16 +0900 Subject: [PATCH] use text if the document has no html and stripHTML off --- 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 291286901..fbc238edd 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -1024,7 +1024,8 @@ class FactEdit(QTextEdit): if source.hasHtml() and "qrichtext" in unicode(source.html()): self.insertHtml(source.html()) return - if source.hasText() and ankiqt.mw.config['stripHTML']: + if source.hasText() and (ankiqt.mw.config['stripHTML'] or + not source.hasHtml()): txt = unicode(source.text()) l = txt.lower() if l.startswith("http://") or l.startswith("file://"):