Skip to content

Commit 10ae7c9

Browse files
committed
Strip quoted delims in file type magic 0x3C
1 parent fcf9182 commit 10ae7c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bits/75_xlml.js

+1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ function parse_xlml_xml(d, _opts)/*:Workbook*/ {
183183
else str = utf8read(str);
184184
}
185185
var opening = str.slice(0, 1024).toLowerCase(), ishtml = false;
186+
opening = opening.replace(/".*?"/g, "");
186187
if((opening.indexOf(">") & 1023) > Math.min((opening.indexOf(",") & 1023), (opening.indexOf(";")&1023))) { var _o = dup(opts); _o.type = "string"; return PRN.to_workbook(str, _o); }
187188
if(opening.indexOf("<?xml") == -1) ["html", "table", "head", "meta", "script", "style", "div"].forEach(function(tag) { if(opening.indexOf("<" + tag) >= 0) ishtml = true; });
188189
if(ishtml) return HTML_.to_workbook(str, opts);

0 commit comments

Comments
 (0)