successfully sent X commands" are now working again
Message-ID: <54ace69b.FEyztMeP75ToQt0A%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: e06a613e23bc1c4d96d8ffe5a36cc41eb6314a15
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e06a613e23bc1c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 7 08:44:31 2015 +0100
#1802 FIX Links in messages like "successfully sent X commands" are now working
again
The werk #1800 introduced a problem where different HTML tags which are used in
message texts were not interpreted as intended. This change makes the links
working again and also allows <sup> and <p> tags in messages again.
---
.werks/1802 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 4 +++-
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/1802 b/.werks/1802
new file mode 100644
index 0000000..637c2e9
--- /dev/null
+++ b/.werks/1802
@@ -0,0 +1,12 @@
+Title: Links in messages like "successfully sent X commands" are now working
again
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1420616484
+
+The werk #1800 introduced a problem where different HTML tags which are used in
+message texts were not interpreted as intended. This change makes the links
+working again and also allows <sup> and <p> tags in messages again.
diff --git a/ChangeLog b/ChangeLog
index 1f1eefb..993e04b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@
* 1799 FIX: Dashboards: Existing views added to dashboards now get a correct title /
title_url
* 1800 FIX: Fixed umlauts and HTML tags in exception texts...
* 1796 FIX: Fix filtering in Multisite View BI Boxes...
+ * 1802 FIX: Links in messages like "successfully sent X commands" are now
working again...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 12d7912..4b29b9d 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -989,7 +989,9 @@ class html:
# <b>, <tt>, <i> to be part of the exception message. The tags
# are escaped first and then fixed again after attrencode.
msg = self.attrencode(obj)
- msg = re.sub(r'<(/?)(b|tt|i|br|pre)>',
r'<\1\2>', msg)
+ msg = re.sub(r'<(/?)(b|tt|i|br|pre|a|sup|p)>',
r'<\1\2>', msg)
+ # Also repair link definitions
+ msg = re.sub(r'<a href="(.*)">',
r'<a href="\1">', msg)
if self.output_format == "html":
if self.mobile: