use text if the document has no html and stripHTML off

This commit is contained in:
Damien Elmes 2011-01-02 17:10:16 +09:00
parent 8fbf2cb412
commit 88c7717537

View file

@ -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://"):