Module: check_mk
Branch: master
Commit: dce585b23ef84771419a48d9f6078216fc6190d3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dce585b23ef847…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jan 11 10:52:17 2019 +0100
Use get_unicode_input() instead of var_utf8().
Change-Id: I8be50e7472ccbefdbed631f3346d64b23d4e74e4
---
cmk/gui/metrics.py | 2 +-
cmk/gui/pagetypes.py | 2 +-
cmk/gui/plugins/sidebar/quicksearch.py | 2 +-
doc/treasures/open_ticket.py | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmk/gui/metrics.py b/cmk/gui/metrics.py
index ab2cb76..c123c5d 100644
--- a/cmk/gui/metrics.py
+++ b/cmk/gui/metrics.py
@@ -885,7 +885,7 @@ def get_graph_template_by_source(graph_templates, source):
def page_host_service_graph_popup():
site_id = html.request.var('site')
host_name = html.request.var('host_name')
- service_description = html.request.var_utf8('service')
+ service_description = html.get_unicode_input('service')
# TODO: Refactor this to some OO based approach
if cmk_graphs_possible(site_id):
diff --git a/cmk/gui/pagetypes.py b/cmk/gui/pagetypes.py
index 575d575..47b11da 100644
--- a/cmk/gui/pagetypes.py
+++ b/cmk/gui/pagetypes.py
@@ -1058,7 +1058,7 @@ class Overridable(Base):
cls.remove_instance((owner_user_id, page_name)) # will be added later
again
else: # clone
title = cls.phrase("clone")
- load_user = html.request.var_utf8("load_user") # FIXME: Change
varname to "owner"
+ load_user = html.get_unicode_input("load_user") # FIXME:
Change varname to "owner"
try:
page = cls.instance((load_user, page_name))
diff --git a/cmk/gui/plugins/sidebar/quicksearch.py
b/cmk/gui/plugins/sidebar/quicksearch.py
index 18d666e..e10767a 100644
--- a/cmk/gui/plugins/sidebar/quicksearch.py
+++ b/cmk/gui/plugins/sidebar/quicksearch.py
@@ -166,7 +166,7 @@ class QuicksearchSnapin(SidebarSnapin):
}
def _ajax_search(self):
- q = html.request.var_utf8('q').strip()
+ q = html.get_unicode_input('q').strip()
if not q:
return
diff --git a/doc/treasures/open_ticket.py b/doc/treasures/open_ticket.py
index 79e25fc..5364467 100644
--- a/doc/treasures/open_ticket.py
+++ b/doc/treasures/open_ticket.py
@@ -8,7 +8,7 @@ config.declare_permission("action.sap_openticket", _("Open
Support Ticket"),
def command_open_ticket(cmdtag, spec, row):
if html.request.var("_sap_openticket"):
- comment = u"OPENTICKET:" +
html.request.var_utf8("_sap_ticket_comment")
+ comment = u"OPENTICKET:" +
html.get_unicode_input("_sap_ticket_comment")
broadcast = 0
forced = 2
command = "SEND_CUSTOM_%s_NOTIFICATION;%s;%s;%s;%s" % \