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

CSV node replace replace with replaceAll just in case

mentioned in Issue #3989
This commit is contained in:
Dave Conway-Jones 2022-12-19 09:50:29 +00:00
parent c065d253e9
commit f6901cd19f
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

View File

@ -19,9 +19,9 @@ module.exports = function(RED) {
function CSVNode(n) { function CSVNode(n) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
this.template = (n.temp || ""); this.template = (n.temp || "");
this.sep = (n.sep || ',').replace("\\t","\t").replace("\\n","\n").replace("\\r","\r"); this.sep = (n.sep || ',').replaceAll("\\t","\t").replaceAll("\\n","\n").replaceAll("\\r","\r");
this.quo = '"'; this.quo = '"';
this.ret = (n.ret || "\n").replace("\\n","\n").replace("\\r","\r"); this.ret = (n.ret || "\n").replaceAll("\\n","\n").replaceAll("\\r","\r");
this.winflag = (this.ret === "\r\n"); this.winflag = (this.ret === "\r\n");
this.lineend = "\n"; this.lineend = "\n";
this.multi = n.multi || "one"; this.multi = n.multi || "one";