Module: check_mk
Branch: master
Commit: 4bbd02050c63af4feb7a6c960b1d8a7d8e6c74ec
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4bbd02050c63af…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 23 13:24:10 2018 +0200
Cleaned up pseudo JSON encoding
CMK-854
Change-Id: I0b847686eeaf8e034dbe37ce17031a0ce466eaf8
---
cmk/gui/sidebar.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cmk/gui/sidebar.py b/cmk/gui/sidebar.py
index 200e8c2..e217c18 100644
--- a/cmk/gui/sidebar.py
+++ b/cmk/gui/sidebar.py
@@ -505,8 +505,7 @@ def ajax_snapin():
finally:
snapin_code.append(html.drain())
- # write all snapins
- html.write('[%s]' % ','.join([ '"%s"' %
s.replace('"', '\\"').replace('\n', '') for s in
snapin_code]))
+ html.write(json.dumps(snapin_code))
@cmk.gui.pages.register("sidebar_move_snapin")