Properly escape node types in palette

We were only escaping the first instance of any invalid dom char
and not all of the
This commit is contained in:
Nick O'Leary
2019-06-28 22:39:27 +01:00
parent b73f12cdba
commit 55645e3730

View File

@@ -150,7 +150,7 @@ RED.palette = (function() {
}
function escapeNodeType(nt) {
return nt.replace(" ","_").replace(".","_").replace(":","_");
return nt.replace(/[ .:]/g,"_");
}
function addNodeType(nt,def) {