tag regex doesn't handle attributes containing > #768
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#768
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've recently had a number of excel files fail when parsing the styles, with a fairly unclear error message:
I've tracked the issue down to the fact that the current regex used for detecting tags is
/<[^>]*>/g
, which can't handle<numFmt numFmtId="164" formatCode="[>0]General" />
as it matches the closing angle bracket inside the formatCode attribute and interprets that as the end of the tag. The regex should be updated to include any number of attributes, disregarding their content, prior to the end of the tag.@MonochromeChameleon thanks for the report! Do you know how were these files produced? In your example, if you put the format code in Excel and save, the generated xml has the encoded
>
I'm not sure exactly where the format code was coming from - I wasn't adding it myself! I'm using excel on a mac instead of on windows, which may have made a difference?