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

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

View File

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