Sanitize subflow env var names properly when building ui form

This commit is contained in:
Nick O'Leary
2019-08-14 11:43:04 +01:00
parent fe084a4478
commit 2daedf8fd5

View File

@@ -1668,7 +1668,7 @@ RED.subflow = (function() {
}
function getSubflowEnvPropertyName(name) {
return 'node-input-subflow-env-'+name.replace(/\s/g,"_");
return 'node-input-subflow-env-'+name.replace(/[^a-z0-9-_]/ig,"_");
}
/**