mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix: Allow CR and LF control chars to be a part of the value (#2526)
To properly parse CSV data.
This commit is contained in:
		@@ -187,7 +187,7 @@ module.exports = function(RED) {
 | 
			
		||||
                                    // if separator is last char in processing string line (without end of line), add null value at the end - example: '1,2,3\n3,"3",'
 | 
			
		||||
                                    k[j] = line.length - 1 === i ? null : "";
 | 
			
		||||
                                }
 | 
			
		||||
                                else if ((line[i] === "\n") || (line[i] === "\r")) { // handle multiple lines
 | 
			
		||||
                                else if (((line[i] === "\n") || (line[i] === "\r")) && f) { // handle multiple lines
 | 
			
		||||
                                    //console.log(j,k,o,k[j]);
 | 
			
		||||
                                    if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
 | 
			
		||||
                                    if ( node.template[j] && (node.template[j] !== "") ) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user