From 5ba20c02444278e0e874082a37eb6bfbb3b2ea94 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Fri, 19 Mar 2021 03:24:36 +0100 Subject: [PATCH] Handling empty properties --- addons/0.documentViewer.QTextBrowser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/0.documentViewer.QTextBrowser.py b/addons/0.documentViewer.QTextBrowser.py index 5d087df..6800f4c 100644 --- a/addons/0.documentViewer.QTextBrowser.py +++ b/addons/0.documentViewer.QTextBrowser.py @@ -43,7 +43,10 @@ class browserDoc(QTextBrowser): self.output += "<" +tag for attr in attrs: - self.output += ' ' +html.escape(attr[0])+ '="' +html.escape(attr[1])+ '"' + if attr[1] != None: + self.output += ' ' +html.escape(attr[0])+ '="' +html.escape(attr[1])+ '"' + else: + self.output += ' ' +html.escape(attr[0]) self.output += ">" def handle_endtag(self,tag):