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

CSV : add warn when unpaired quotes detected on input.

helps handling now that we allow line breaks within fields (as per spec).
This commit is contained in:
Dave Conway-Jones 2020-05-04 14:17:11 +01:00
parent efb9dce92f
commit e2aebaf0e7
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
2 changed files with 3 additions and 2 deletions

View File

@ -213,7 +213,7 @@ module.exports = function(RED) {
}
}
// Finished so finalize and send anything left
//console.log(j,k,o,k[j]);
if (f === false) { node.warn(RED._("csv.errors.bad_csv")); }
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
if ( node.template[j] && (node.template[j] !== "") ) {

View File

@ -725,7 +725,8 @@
},
"errors": {
"csv_js": "This node only handles CSV strings or js objects.",
"obj_csv": "No columns template specified for object -> CSV."
"obj_csv": "No columns template specified for object -> CSV.",
"bad_csv": "Malformed CSV file - output probably corrupt."
}
},
"html": {