Module: check_mk
Branch: master
Commit: 5f0c4fd2c5c76f0198ca3a9e2eb51b2aa693eedf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5f0c4fd2c5c76f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 19 17:05:07 2012 +0100
FIX: remove javascript code from non-HTML output
---
web/htdocs/views.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 65c4ea9..a9367e7 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1413,7 +1413,8 @@ def render_view(view, rows, datasource, group_painters, painters,
selected = get_selected_rows(view, rows,
html.var("selected_rows"))
headinfo = "%d/%s" % (len(selected), headinfo)
- html.javascript("update_headinfo('%s');" % headinfo)
+ if html.output_format == "html":
+ html.javascript("update_headinfo('%s');" % headinfo)
# Play alarm sounds, if critical events have been displayed
if 'S' in display_options and view.get("play_sounds"):