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
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 1 additions and 1 deletions

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,"_");
}
/**