forked from sheetjs/sheetjs
		
	HTML DOM parser skip links with inline javascript
This commit is contained in:
		
							parent
							
								
									47eeaa367d
								
							
						
					
					
						commit
						f38191d266
					
				| @ -187,7 +187,7 @@ function sheet_add_dom(ws/*:Worksheet*/, table/*:HTMLElement*/, _opts/*:?any*/)/ | ||||
| 			if(Aelts && Aelts.length) for(var Aelti = 0; Aelti < Aelts.length; ++Aelti)	if(Aelts[Aelti].hasAttribute("href")) { | ||||
| 				l = Aelts[Aelti].getAttribute("href"); if(l.charAt(0) != "#") break; | ||||
| 			} | ||||
| 			if(l && l.charAt(0) != "#") o.l = ({ Target: l }); | ||||
| 			if(l && l.charAt(0) != "#" &&	l.slice(0, 11).toLowerCase() != 'javascript:') o.l = ({ Target: l }); | ||||
| 			if(opts.dense) { if(!ws[R + or_R]) ws[R + or_R] = []; ws[R + or_R][C + or_C] = o; } | ||||
| 			else ws[encode_cell({c:C + or_C, r:R + or_R})] = o; | ||||
| 			if(range.e.c < C + or_C) range.e.c = C + or_C; | ||||
| @ -227,4 +227,4 @@ function get_get_computed_style_function(element/*:HTMLElement*/)/*:?function*/ | ||||
| 	// If it is not available, try to get one from the global namespace
 | ||||
| 	if(typeof getComputedStyle === 'function') return getComputedStyle; | ||||
| 	return null; | ||||
| } | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user