From e9cf1ad0fb6b059d02ad984270d8d845e7f4f22d Mon Sep 17 00:00:00 2001 From: SheetJS Date: Wed, 4 Jan 2023 12:35:13 -0500 Subject: [PATCH] ignore unexpected attributes in rich text part Co-authored-by: colin4 --- bits/42_sstxml.js | 2 +- xlsx.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bits/42_sstxml.js b/bits/42_sstxml.js index 27f0bae..c9a6ff9 100644 --- a/bits/42_sstxml.js +++ b/bits/42_sstxml.js @@ -168,7 +168,7 @@ var rs_to_html = /*#__PURE__*/(function parse_rs_factory() { })(); /* 18.4.8 si CT_Rst */ -var sitregex = /<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g, sirregex = /<(?:\w+:)?r>/; +var sitregex = /<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g, sirregex = /<(?:\w+:)?r\b[^>]*>/; var sirphregex = /<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g; function parse_si(x, opts) { var html = opts ? opts.cellHTML : true; diff --git a/xlsx.mjs b/xlsx.mjs index c05bfdb..af40942 100644 --- a/xlsx.mjs +++ b/xlsx.mjs @@ -9947,7 +9947,7 @@ var rs_to_html = /*#__PURE__*/(function parse_rs_factory() { })(); /* 18.4.8 si CT_Rst */ -var sitregex = /<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g, sirregex = /<(?:\w+:)?r>/; +var sitregex = /<(?:\w+:)?t[^>]*>([^<]*)<\/(?:\w+:)?t>/g, sirregex = /<(?:\w+:)?r\b[^>]*>/; var sirphregex = /<(?:\w+:)?rPh.*?>([\s\S]*?)<\/(?:\w+:)?rPh>/g; function parse_si(x, opts) { var html = opts ? opts.cellHTML : true;