1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

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) {