You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Version 5.7.x stops decoding HTML entities by default #829
It seems like 5.7.0 introduced a change to how it decodes HTML entities. I suspect this is the bump from @nodable/entities@1.1.0 to @nodable/entities@2.1.0. If an XML value includes a numeric HTML entity such as ' (apostrophe), it doesn't get decoded.
Expected behaviour
' should get decoded to '.
Observed behaviour
' doesn't get decoded.
Status
For now we're stuck with 5.6.0, but this is breaking in the sense that the parsing doesn't produce the same string values.
Environment
Lib Version: 5.7.0 / 5.7.1 / 5.7.2
Node Version: 24.15.0
Should you need more information, please let me know.
We're glad you find this project helpful. We'll try to address this issue ASAP. You can join Discord channel(https://discord.gg/X4Qp9u6Vz) for anonucements and pre release discussions. Don't forget to star this repo.
This is how it used to work on 5.6.0, so how we currently have on our codebase. This was broken on the 5.7.0 upgrade, so the numeric html entities (as the above) now don't get decoded.
Here's a repro case: https://github.com/nunomarks/fxp-repro. With the default configuration, the html entities fail to get decoded. If you change the version to 5.6.0, then it works.
Thanks to highlight. It might be because I included entities library in that version but then migrated to its new version. But I cant confirm. Do you want me to further investigate it and mark v5.6.0 deprecated? If you really need it I can look into this as soon as I get some bandwidth.
How would that investigation help you? What is your expectation from that? You would have to either switch to older version 5.5.X or newer version 5.7.X if 5.6.0 was found to be culprit.
How would that investigation help you? What is your expectation from that? You would have to either switch to older version 5.5.X or newer version 5.7.X if 5.6.0 was found to be culprit.
Wasn't the "breaking version" 5.7.0? Because, according to the reproducible case, it is the affected version, not 5.6.0. We still see normal entity decoding on 5.6.0
5.7.0 explicitly throwing error when user were setting numerical entities as external entity as it was already supported internally since v4.x. But since some projects were still using that hack, 5.7.2 was released to allow it, however, it makes no sense and no new project is expected to set numerical entities externally.
But this is not the case with you in my understanding. So I dont see any reason why you cant use v5.7.2. I'll again repeat numerical entities were supposed to be used through htmlEntity flag only in past.
You must check changelog for better understanding.
Activity
github-actions commentedon May 2, 2026
We're glad you find this project helpful. We'll try to address this issue ASAP. You can join Discord channel(https://discord.gg/X4Qp9u6Vz) for anonucements and pre release discussions. Don't forget to star this repo.
amitguptagwl commentedon May 2, 2026
can you please let me know options you're setting? I hope you're not setting it externally.
nunomarks commentedon May 3, 2026
This is how I'm settings the parser instance:
nunomarks commentedon May 3, 2026
And this is sample xml you can test with:
TheDeathConqueror commentedon May 3, 2026
nunomarks commentedon May 3, 2026
This is how it used to work on 5.6.0, so how we currently have on our codebase. This was broken on the 5.7.0 upgrade, so the numeric html entities (as the above) now don't get decoded.
amitguptagwl commentedon May 3, 2026
numeric entities were being controlled by htmlEntity flag only as in v5.7.2. Were you setting external entities?
nunomarks commentedon May 4, 2026
No, we're merely instantiating the parser with those options shown above.
amitguptagwl commentedon May 5, 2026
I can't comment on how your previous code was implemented but this is working fine when required config is set.
nunomarks commentedon May 5, 2026
Here's a repro case: https://github.com/nunomarks/fxp-repro. With the default configuration, the html entities fail to get decoded. If you change the version to
5.6.0, then it works.amitguptagwl commentedon May 5, 2026
Thanks to highlight. It might be because I included entities library in that version but then migrated to its new version. But I cant confirm. Do you want me to further investigate it and mark v5.6.0 deprecated? If you really need it I can look into this as soon as I get some bandwidth.
nunomarks commentedon May 5, 2026
We're fine at
5.6.0, it's not blocking us, so we can wait for the investigation whenever you have the bandwidth. Thank you!amitguptagwl commentedon May 6, 2026
How would that investigation help you? What is your expectation from that? You would have to either switch to older version 5.5.X or newer version 5.7.X if 5.6.0 was found to be culprit.
nunomarks commentedon May 6, 2026
Wasn't the "breaking version" 5.7.0? Because, according to the reproducible case, it is the affected version, not 5.6.0. We still see normal entity decoding on 5.6.0
amitguptagwl commentedon May 6, 2026
5.7.0 explicitly throwing error when user were setting numerical entities as external entity as it was already supported internally since v4.x. But since some projects were still using that hack, 5.7.2 was released to allow it, however, it makes no sense and no new project is expected to set numerical entities externally.
But this is not the case with you in my understanding. So I dont see any reason why you cant use v5.7.2. I'll again repeat numerical entities were supposed to be used through htmlEntity flag only in past.
You must check changelog for better understanding.
nunomarks commentedon May 6, 2026
So what you're saying is that upgrading to v5.7.2 and setting
htmlEntities: trueis the right fix, am I right to assume that?nunomarks commentedon May 20, 2026
@amitguptagwl could you confirm my previous statement?
nunomarks commentedon May 29, 2026
@amitguptagwl 👆
fix(catalog-config): pin fast-xml-parser to 5.7.3 to unbreak STS web-…