Module: check_mk
Branch: master
Commit: 73817857ac4823dca6fd301f6bc8954637bec5f7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=73817857ac4823…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Dec 9 14:04:39 2013 +0100
FIX Fixed incorrect html formatting when displaying host or service comments
The comment icon in a multisite view was not drawn correctly whenever
a comment for this host or service had a single quote.
---
.werks/239 | 9 +++++++++
ChangeLog | 1 +
web/plugins/icons/builtin.py | 1 +
3 files changed, 11 insertions(+)
diff --git a/.werks/239 b/.werks/239
new file mode 100644
index 0000000..40b6bef
--- /dev/null
+++ b/.werks/239
@@ -0,0 +1,9 @@
+Title: Fixed incorrect html formatting when displaying host or service comments
+Level: 1
+Component: multisite
+Version: 1.2.3i8
+Date: 1386594095
+Class: fix
+
+The comment icon in a multisite view was not drawn correctly whenever
+a comment for this host or service had a single quote.
diff --git a/ChangeLog b/ChangeLog
index 126a657..72ef6c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in
Chrome/IE
+ * 0239 FIX: Fixed incorrect html formatting when displaying host or service
comments...
WATO:
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index ee90cf1..4bcfc7f 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -380,6 +380,7 @@ def paint_comments(what, row, tags, custom_vars):
text = ""
for c in comments:
id, author, comment, ty, timestamp = c
+ comment = comment.replace("\n",
"<br>").replace("'","'")
text += "%s %s: \"%s\" \n" % (paint_age(timestamp, True,
0, 'abs')[1], author, comment)
return link_to_view('<img class=icon title=\'%s\' ' \
'src="images/icon_comment.gif">' %