[TASK] Replace all specialchars in NODE_NAME in stat urls

This commit is contained in:
Xaver Maierhofer 2016-05-23 00:48:03 +02:00 committed by Milan Pässler
parent e9e393e105
commit 6f4b9d6701

View file

@ -469,7 +469,7 @@ define(["moment", "numeral", "tablesort", "tablesort.number", "moment.de"],
function showStatImg(o, d) {
var subst = {};
subst["{NODE_ID}"] = d.nodeinfo.node_id ? d.nodeinfo.node_id : "unknown";
subst["{NODE_NAME}"] = d.nodeinfo.hostname ? d.nodeinfo.hostname : "unknown";
subst["{NODE_NAME}"] = d.nodeinfo.hostname ? d.nodeinfo.hostname.replace(/[^a-z0-9\-]/ig, '_') : "unknown";
return showStat(o, subst);
}