Module: check_mk
Branch: master
Commit: 7ba8b1b1e988eee6330aaf2607ff90c805be94a3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ba8b1b1e988ee…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 14 14:09:32 2015 +0100
#2895 FIX Fixed broken "back to view" links after checkbox actions in views
There should be two links: "Back to view" and "Back to view with checkbox
reset".
There was only one the last one visible but it had mixed up URLs with the first one
which resulted in strange behaviours on the target pages.
---
.werks/2895 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/2895 b/.werks/2895
new file mode 100644
index 0000000..30e0f93
--- /dev/null
+++ b/.werks/2895
@@ -0,0 +1,11 @@
+Title: Fixed broken "back to view" links after checkbox actions in views
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i4
+Date: 1450098481
+Class: fix
+
+There should be two links: "Back to view" and "Back to view with checkbox
reset".
+There was only one the last one visible but it had mixed up URLs with the first one
+which resulted in strange behaviours on the target pages.
diff --git a/ChangeLog b/ChangeLog
index a8a6700..598f89a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -183,6 +183,7 @@
* 2804 FIX: Avoid redeclaration errors in graphs when using pnp basket...
* 2877 FIX: Do not reopen search form when doing actions via Host/Service search
* 2810 FIX: esx_vsphere_counters, winperf_phydisk: fixed exception on pnpgraph
overview page...
+ * 2895 FIX: Fixed broken "back to view" links after checkbox actions in
views...
WATO:
* 2442 WATO remove host: improved cleanup of obsolete host files...
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 620abb5..9c8daa7 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1378,7 +1378,7 @@ class html(GUITester):
msg = self.attrencode(obj)
msg = re.sub(r'<(/?)(h2|b|tt|i|br(?:
/)?|pre|a|sup|p|li|ul|ol)>', r'<\1\2>', msg)
# Also repair link definitions
- return re.sub(r'<a href="(.*)">',
r'<a href="\1">', msg)
+ return re.sub(r'<a href="(.*?)">',
r'<a href="\1">', msg)
# Encode HTML attributes: replace " with ", also replace
# < and >. This code is slow. Works on str and unicode without