forked from sheetjs/sheetjs
		
	SSF undefined string guard (fixes #584)
note: @sheetjsdev authored commit, original PR date/author used
This commit is contained in:
		
							parent
							
								
									a846f7184d
								
							
						
					
					
						commit
						d83986d31c
					
				| @ -201,6 +201,7 @@ function write_sst_xml(sst/*:SST*/, opts)/*:string*/ { | ||||
| 		if(s.r) sitag += s.r; | ||||
| 		else { | ||||
| 			sitag += "<t"; | ||||
| 			if(!s.t) s.t = ""; | ||||
| 			if(s.t.match(straywsregex)) sitag += ' xml:space="preserve"'; | ||||
| 			sitag += ">" + escapexml(s.t) + "</t>"; | ||||
| 		} | ||||
|  | ||||
							
								
								
									
										2
									
								
								test.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								test.js
									
									
									
									
									
								
							| @ -1156,7 +1156,7 @@ describe('json output', function() { | ||||
| 	it('should handle raw data if requested', function() { | ||||
| 		var _ws = sheet_from_array_of_arrays(data, {cellDates:true}); | ||||
| 		var json = X.utils.sheet_to_json(_ws, {header:1, raw:true}); | ||||
| 		console.log(json, typeof json[2][2]); | ||||
| 		//console.log(json, typeof json[2][2]);
 | ||||
| 		assert.equal(json.length, data.length); | ||||
| 		assert.equal(json[1][0], true); | ||||
| 		assert.equal(json[2][1], "bar"); | ||||
|  | ||||
| @ -4812,6 +4812,7 @@ function write_sst_xml(sst/*:SST*/, opts)/*:string*/ { | ||||
| 		if(s.r) sitag += s.r; | ||||
| 		else { | ||||
| 			sitag += "<t"; | ||||
| 			if(!s.t) s.t = ""; | ||||
| 			if(s.t.match(straywsregex)) sitag += ' xml:space="preserve"'; | ||||
| 			sitag += ">" + escapexml(s.t) + "</t>"; | ||||
| 		} | ||||
|  | ||||
							
								
								
									
										1
									
								
								xlsx.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										1
									
								
								xlsx.js
									
									
									
									
									
								
							| @ -4758,6 +4758,7 @@ function write_sst_xml(sst, opts) { | ||||
| 		if(s.r) sitag += s.r; | ||||
| 		else { | ||||
| 			sitag += "<t"; | ||||
| 			if(!s.t) s.t = ""; | ||||
| 			if(s.t.match(straywsregex)) sitag += ' xml:space="preserve"'; | ||||
| 			sitag += ">" + escapexml(s.t) + "</t>"; | ||||
| 		} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user