From 82e909e0edb935a2a35d6d419c7303aa27341051 Mon Sep 17 00:00:00 2001 From: Squillante Date: Tue, 7 Aug 2018 12:41:41 -0500 Subject: [PATCH] Recognize case-insensitive properties Fixes #1204 ; Closes #1205 --- bits/22_xmlutils.js | 2 ++ xlsx.flow.js | 2 ++ xlsx.js | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bits/22_xmlutils.js b/bits/22_xmlutils.js index c42d64f..ee49980 100644 --- a/bits/22_xmlutils.js +++ b/bits/22_xmlutils.js @@ -21,11 +21,13 @@ function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/)/*:any*/ { if(j===q.length) { if(q.indexOf("_") > 0) q = q.slice(0, q.indexOf("_")); // from ods z[q] = v; + z[q.toLowerCase()] = v; } else { var k = (j===5 && q.slice(0,5)==="xmlns"?"xmlns":"")+q.slice(j+1); if(z[k] && q.slice(j-3,j) == "ext") continue; // from ods z[k] = v; + z[k.toLowerCase()] = v; } } return z; diff --git a/xlsx.flow.js b/xlsx.flow.js index ac67071..044ae88 100644 --- a/xlsx.flow.js +++ b/xlsx.flow.js @@ -2224,11 +2224,13 @@ function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/)/*:any*/ { if(j===q.length) { if(q.indexOf("_") > 0) q = q.slice(0, q.indexOf("_")); // from ods z[q] = v; + z[q.toLowerCase()] = v; } else { var k = (j===5 && q.slice(0,5)==="xmlns"?"xmlns":"")+q.slice(j+1); if(z[k] && q.slice(j-3,j) == "ext") continue; // from ods z[k] = v; + z[k.toLowerCase()] = v; } } return z; diff --git a/xlsx.js b/xlsx.js index 950ca0f..04e5ed3 100644 --- a/xlsx.js +++ b/xlsx.js @@ -2146,11 +2146,13 @@ function parsexmltag(tag, skip_root) { if(j===q.length) { if(q.indexOf("_") > 0) q = q.slice(0, q.indexOf("_")); // from ods z[q] = v; + z[q.toLowerCase()] = v; } else { var k = (j===5 && q.slice(0,5)==="xmlns"?"xmlns":"")+q.slice(j+1); if(z[k] && q.slice(j-3,j) == "ext") continue; // from ods z[k] = v; + z[k.toLowerCase()] = v; } } return z;