File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -977,7 +977,10 @@ def _updateText(self):
977977 QLineEdit .setText (self , text )
978978
979979
980- RICH_PREFIX = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd">'
980+ RICH_PREFIX = ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" ' \
981+ '"http://www.w3.org/TR/REC-html40/strict.dtd">' ,
982+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" ' \
983+ '"https://www.w3.org/TR/REC-html40/strict.dtd">' )
981984
982985
983986class TextBrowser (QTextBrowser ):
Original file line number Diff line number Diff line change @@ -127,8 +127,10 @@ def numberToFraction(text):
127127
128128
129129def htmlToPlainText (text ):
130- RICH_PREFIX = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" ' \
131- '"https://www.w3.org/TR/REC-html40/strict.dtd">'
130+ RICH_PREFIX = ('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" ' \
131+ '"http://www.w3.org/TR/REC-html40/strict.dtd">' ,
132+ '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" ' \
133+ '"https://www.w3.org/TR/REC-html40/strict.dtd">' )
132134 if text .startswith (RICH_PREFIX ):
133135 document = QTextDocument ()
134136 document .setHtml (text )
You can’t perform that action at this time.
0 commit comments