Module: check_mk
Branch: master
Commit: ba4aceeb2dfe1d3bda506f465add76ee8582947f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ba4aceeb2dfe1d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Aug 27 14:18:40 2011 +0200
FIX: allow Umlauts in view title+description
---
ChangeLog | 1 +
web/htdocs/views.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9810bdf..c0d18d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
* FIX: Removed new python syntax which is incompatible with old python versions
* FIX: Made bulk inventory work in IE
* FIX: Fixed js errors in IE when having not enough space on dashboard
+ * FIX: fix error when using non-Ascii characters in view title
* Views are not reloaded completely anymore. The data tables are reloaded
on their own.
* Open tabs in views do not prevent reloading the displayed data anymore
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 862a8ab..356e59d 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -874,7 +874,7 @@ def create_view():
raise MKUserError("view_name", _("Please supply a unique name for
the view, this will be used to specify that view in HTTP links."))
if not re.match("^[a-zA-Z0-9_]+$", name):
raise MKUserError("view_name", _("The name of the view may only
contain letters, digits and underscores."))
- title = html.var("view_title").strip()
+ title = html.var_utf8("view_title").strip()
if title == "":
raise MKUserError("view_title", _("Please specify a title for your
view"))
linktitle = html.var("view_linktitle").strip()
@@ -884,7 +884,7 @@ def create_view():
if not icon:
icon = None
- topic = html.var("view_topic")
+ topic = html.var_utf8("view_topic")
if not topic:
topic = _("Other")
datasourcename = html.var("datasource")
@@ -988,7 +988,7 @@ def create_view():
"topic" : topic,
"linktitle" : linktitle,
"icon" : icon,
- "description" : html.var("view_description",
""),
+ "description" : html.var_utf8("view_description",
""),
"datasource" : datasourcename,
"public" : public,
"hidden" : hidden,