diff --git a/nodes/core/parsers/70-CSV.html b/nodes/core/parsers/70-CSV.html index 5632246fb..45ab43e4b 100644 --- a/nodes/core/parsers/70-CSV.html +++ b/nodes/core/parsers/70-CSV.html @@ -28,6 +28,7 @@ + @@ -100,7 +101,7 @@ return this.name?"node_label_italic":""; }, oneditprepare: function() { - if (this.sep == "," || this.sep == "\\t" || this.sep == ";" || this.sep == ":" || this.sep == " ") { + if (this.sep == "," || this.sep == "\\t" || this.sep == ";" || this.sep == ":" || this.sep == " " || this.sep == "#") { $("#node-input-select-sep").val(this.sep); $("#node-input-sep").hide(); } else { diff --git a/nodes/core/parsers/70-CSV.js b/nodes/core/parsers/70-CSV.js index 7bb6f76d2..71b11fc6f 100644 --- a/nodes/core/parsers/70-CSV.js +++ b/nodes/core/parsers/70-CSV.js @@ -102,6 +102,7 @@ module.exports = function(RED) { if (msg.payload[i] === node.quo) { // if it's a quote toggle inside or outside f = !f; if (msg.payload[i-1] === node.quo) { k[j] += '\"'; } // if it's a quotequote then it's actually a quote + if ((msg.payload[i-1] !== node.sep) && (msg.payload[i+1] !== node.sep)) { k[j] += msg.payload[i]; } } else if ((msg.payload[i] === node.sep) && f) { // if we are outside of quote (ie valid separator if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }