wordpress-mobile / wordpress-mobile/AztecEditor-iOS
Support for HTML5.0 Entity Codes/Names
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 669
- Forks
- 153
- Avg merge
- 11h 27m
- Merged PRs (30d)
- 4
Description
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. 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).</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. 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).
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied HTML in the editor and tracing the HTML-loading path responsible for entity decoding. Verify support for the listed HTML5 entity names, including comma, period, apostrophe, and parentheses, and confirm that the resulting editor text matches the expected characters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100