CSV node check header properties for ' and "

and add test
to close #3919
This commit is contained in:
Dave Conway-Jones
2022-10-16 18:05:21 +01:00
parent 946def022f
commit d693af9615
2 changed files with 31 additions and 1 deletions

View File

@@ -135,7 +135,10 @@ module.exports = function(RED) {
ou += node.sep;
}
else {
var p = RED.util.getMessageProperty(msg,"payload["+s+"]['"+template[t]+"']");
var tt = template[t];
if (template[t].indexOf('"') >=0 ) { tt = "'"+tt+"'"; }
else { tt = '"'+tt+'"'; }
var p = RED.util.getMessageProperty(msg,'payload["'+s+'"]['+tt+']');
/* istanbul ignore else */
if (p === undefined) { p = ""; }
// fix to honour include null values flag