Module: check_mk
Branch: master
Commit: 0a3f17d05b8ef65be2b6b1ba3773cfafc2a14243
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a3f17d05b8ef6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 23 09:47:32 2018 +0200
6361 FIX Fixed HTML fragments in customer column of views in PDF reports
When a view that contains the customer column e.g. of a host, this column
was containing HTML tags instead of just the customer name.
Change-Id: Ie3f02475e94fa2de08aeab4e36b781121a71d1f5
---
.werks/6361 | 12 ++++++++++++
cmk/gui/plugins/views/utils.py | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/6361 b/.werks/6361
new file mode 100644
index 0000000..9d362c1
--- /dev/null
+++ b/.werks/6361
@@ -0,0 +1,12 @@
+Title: Fixed HTML fragments in customer column of views in PDF reports
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+Edition: cme
+State: unknown
+Version: 1.6.0i1
+Date: 1532196113
+
+When a view that contains the customer column e.g. of a host, this column
+was containing HTML tags instead of just the customer name.
diff --git a/cmk/gui/plugins/views/utils.py b/cmk/gui/plugins/views/utils.py
index 5fabbfa..2fac4e8 100644
--- a/cmk/gui/plugins/views/utils.py
+++ b/cmk/gui/plugins/views/utils.py
@@ -1321,7 +1321,7 @@ class Cell(object):
txt = img_filename
if isinstance(txt, HTML):
- txt = "%s" % txt
+ txt = html.strip_tags("%s" % txt)
elif not isinstance(txt, tuple):
txt = html.escaper.unescape_attributes(txt)