[checkmk-commits] Check_MK Git: check_mk: WATO: HTML encoding the datasource program value

git version control git at mathias-kettner.de
Fri Sep 14 10:25:24 CEST 2012


Module: check_mk
Branch: master
Commit: 2023106e1533dd10ab29b779b00701d663fcc269
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2023106e1533dd10ab29b779b00701d663fcc269

Author: Lars Michelsen <lm at mathias-kettner.de>
Date:   Fri Sep 14 09:56:30 2012 +0200

WATO: HTML encoding the datasource program value

---

 web/htdocs/wato.py                         |    3 ++-
 web/plugins/wato/check_mk_configuration.py |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index d059a8b..949aaa6 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -9342,6 +9342,7 @@ vs_rule_options = Dictionary(
             help = _("An optional comment that helps you documenting the purpose of  "
                      "this rule"),
             size = 80,
+            attrencode = True,
           )
         ),
         ( "docu_url",
@@ -9844,7 +9845,7 @@ def mode_edit_ruleset(phase):
             url = rule_options.get("docu_url")
             if url:
                 html.icon_button(url, _("Context information about this rule"), "url", target="_blank")
-            html.write(rule_options.get("comment", ""))
+            html.write(htmllib.attrencode(rule_options.get("comment", "")))
             html.write('</td>')
 
 
diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py
index 951d479..46ec1b7 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -1102,5 +1102,6 @@ register_rule(group,
                  "via SSH. The command line may contain the placeholders <tt><IP></tt> and "
                  "<tt><HOST></tt>."),
         label = _("Command line to execute"),
-        size = 80))
+        size = 80,
+        attrencode = True))
 



More information about the checkmk-commits mailing list