Module: check_mk
Branch: master
Commit: 41e3b36aa2969889d719afe13a0d7a0d05feafff
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=41e3b36aa29698…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Nov 22 15:18:30 2013 +0100
html.attrencode now tries to convert non - str/unicode values (e.g Exception messages)
into a str
---
web/htdocs/htmllib.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index c3884a3..16f2c8c 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1076,6 +1076,9 @@ class html:
def attrencode(self, value):
if type(value) == int:
return str(value)
+ elif type(value) not in [str, unicode]:
+ value = str(value)
+
new = ""
for c in value:
if c == '"':