Module: check_mk
Branch: master
Commit: 17db64169935ad48b8cb5c96b3d03ffb1601d839
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=17db64169935ad…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Nov 19 12:28:48 2013 +0100
FIX Encoding bug on rendering global settings
The valuespec helptext was not properly converted from unicode to utf-8
---
.werks/39 | 8 ++++++++
ChangeLog | 2 +-
web/htdocs/wato.py | 4 +++-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/39 b/.werks/39
new file mode 100644
index 0000000..9dd7d42
--- /dev/null
+++ b/.werks/39
@@ -0,0 +1,8 @@
+Title: Encoding bug on rendering global settings
+Level: 1
+Component: wato
+Version: 1.2.3i7
+Date: 1384860471
+Class: fix
+
+The valuespec helptext was not properly converted from unicode to utf-8
diff --git a/ChangeLog b/ChangeLog
index cd2c45c..34f8ef8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,8 +48,8 @@
* 0094 FIX: Hide SNMPv3 credentials in WATO...
* 0212 FIX: Fixed loading of sites with configured tcp socket in WATO
* 0095 FIX: Fixed problem with portnumber in Wato Distributed Monitoring dialog
- * 0096 FIX: Fixed exception in wato
* 0213 FIX: LDAP: Various small improvements for handling the LDAP user connector
+ * 0039 FIX: Encoding bug on rendering global settings...
Notifications:
* 0005 Added notification script for sending SMS via
mobilant.com...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a25d868..ff501fe 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6052,9 +6052,11 @@ def render_global_configuration_variables(default_values,
current_settings):
defaultvalue = default_values.get(varname, valuespec.default_value())
edit_url = make_link([("mode", "edit_configvar"),
("varname", varname), ("site", html.var("site",
""))])
+ help_text = type(valuespec.help()) == unicode and
valuespec.help().encode("utf-8") or valuespec.help() or ''
+ title_text = type(valuespec.title()) == unicode and
valuespec.title().encode("utf-8") or valuespec.title()
title = '<a href="%s" class=%s
title="%s">%s</a>' % \
(edit_url, varname in current_settings and "modified" or
"",
- html.strip_tags(valuespec.help() or ''), valuespec.title())
+ html.strip_tags(help_text), title_text)
if varname in current_settings:
to_text = valuespec.value_to_text(current_settings[varname])