-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
Hi 👋
Previously, I opened #42 to correctly unescape whitespace HTML entity codes.
However, that the approach already present turned out to be not very scalable, as many valid entities are still not decoded correctly.
For example:
ï -> ï
° -> °
These entities are automatically decoded in GitHub’s markdown preview, but not in marked-react, which leads to inconsistent rendering in our application (some entities decoded, others not).
Proposed solution
Use html-entities, a lightweight package without dependencies, to safely decode all valid HTML entities.
Example
Input:
Café – temperature: 23°CExpected output:
Café – temperature: 23°C
Actual output (current):
Café – temperature: 23°C
Would you consider adding this improvement?
I’d be happy to open a PR if this approach sounds good.
Metadata
Metadata
Assignees
Labels
No labels