Revert "Ui/Sparklines: Remove img src before putting it into DOM"

This reverts commit a75796c64d.
This commit is contained in:
Marius Hein 2014-06-06 14:41:57 +02:00
parent 7c67a2ffff
commit 4587f26476
2 changed files with 1 additions and 17 deletions

View File

@ -269,7 +269,7 @@
if (this.processRedirectHeader(req)) return;
// div helps getting an XML tree
var $resp = $('<div>' + icinga.ui.removeImageSourceFromSparklines(req.responseText) + '</div>');
var $resp = $('<div>' + req.responseText + '</div>');
var active = false;
var rendered = false;
var classes;

View File

@ -657,22 +657,6 @@
);
},
/**
* 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;