-
Notifications
You must be signed in to change notification settings - Fork 47.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Unsupported HTML character references #28820
Comments
i could not see that bug |
There are two approaches
Or using dangerouslySetInnerHTML:
|
@Yobro7292 Yeah, I know these workarounds, but I still think React should support all the standard character references.
@XudayfiIbra The first row of the table in the demo is an example of a supported character reference: |
@valtlai Oh i didn't notice that! |
@check below code . use html-entities for unsupported symbols .
|
This is working as intended, see facebook/jsx#136 |
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
React does not support all the named character references, “entities”, defined in the HTML specification:
React version: 18.2.0
Steps To Reproduce
Render the following demo component and compare the exepcteds character and the actual rendering results.
Code demo
Link to code example: https://codepen.io/valtlai/pen/qBwYezG?editors=1010
The current behavior
React does not recognize some character references but renders them as is.
The expected behavior
React should recognize all the specced character references that end with a semicolon and render the characters they represent.
The text was updated successfully, but these errors were encountered: