Skip to content
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

Support for HTML5.0 Entity Codes/Names #1399

Open
rengalerio opened this issue Aug 9, 2024 · 0 comments
Open

Support for HTML5.0 Entity Codes/Names #1399

rengalerio opened this issue Aug 9, 2024 · 0 comments

Comments

@rengalerio
Copy link

rengalerio commented Aug 9, 2024

I'm currently having problems converting HTML5 entity names like ,, ., (, ), etc. to its corresponding character when loading an html string to the editor. As a result, I would like to have these new entity names and codes supported when loading HTML5 content to the editor.

An alternative would be to parse these entity codes on my end but this would be tedious considering there are numerous additions of these in HTML5.

This is a sample html string passed on to the editor:

<p style=\"text-align: left;\">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout&period; The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters&comma; as opposed to using &apos;Content here&comma; content here&apos;&comma; making it look like readable English&period; Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text&comma; and a search for &apos;lorem ipsum&apos; will uncover many web sites still in their infancy&period; Various versions have evolved over the years&comma; sometimes by accident&comma; sometimes on purpose &lpar;injected humour and the like&rpar;&period;</p>

This is the resulting text loaded in the editor:
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout&period; The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters&comma; as opposed to using \'Content here&comma; content here\'&comma; making it look like readable English&period; Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text&comma; and a search for \'lorem ipsum\' will uncover many web sites still in their infancy&period; Various versions have evolved over the years&comma; sometimes by accident&comma; sometimes on purpose &lpar;injected humour and the like&rpar;&period;

This is the expected result:
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy, Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

@rengalerio rengalerio changed the title Support for HTML 5.0 Entity Codes/Names Support for HTML5.0 Entity Codes/Names Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant