From 32ea88c65adc4589844cc4fc36d47862349d2d94 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Mon, 23 May 2016 00:48:03 +0200 Subject: [PATCH] [TASK] Replace all specialchars in NODE_NAME in stat urls --- lib/infobox/node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/infobox/node.js b/lib/infobox/node.js index d4e8d4e..ff267ae 100644 --- a/lib/infobox/node.js +++ b/lib/infobox/node.js @@ -238,7 +238,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); }