diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js
index 3b92e5b2f..338629136 100644
--- a/public/js/icinga/loader.js
+++ b/public/js/icinga/loader.js
@@ -269,7 +269,7 @@
if (this.processRedirectHeader(req)) return;
// div helps getting an XML tree
- var $resp = $('
' + req.responseText + '
');
+ var $resp = $('' + icinga.ui.removeImageSourceFromSparklines(req.responseText) + '
');
var active = false;
var rendered = false;
var classes;
diff --git a/public/js/icinga/ui.js b/public/js/icinga/ui.js
index e76e2dba8..6902953ca 100644
--- a/public/js/icinga/ui.js
+++ b/public/js/icinga/ui.js
@@ -657,6 +657,22 @@
);
},
+ /**
+ * Find all svg charts and removes src attributes for sparklines
+ *
+ * @param {string} text
+ * @returns {string}
+ */
+ removeImageSourceFromSparklines: function(text) {
+ var match, sourceMatch;
+ var re = new RegExp(/(src=".+chart.php[^"]+")/g);
+ var reSource = new RegExp(/src="([^"]+)"/);
+ while ((match = re.exec(text))) {
+ text = text.replace(match[0], '');
+ }
+ return text;
+ },
+
initializeControls: function (parent) {
var self = this;