It would be nice to convert all entities in a document to either:
html4 (use B format for codes without entities)
html5 (use B format for codes without entities)
to literal character target taken from <meta charset="utf-8">
Perhaps there could be a list of literal chars to always use, to never use, ditto entities.
Nice to convert HTML4 <-> HTML5
When you are using a variety of editing tools, it is easy to get documents inconsistently coded.
If you parse your own HTML, it is nice to have it coded consistently.
entity converter
- Albert Wiersch
- Site Admin
- Posts: 3785
- Joined: Sat Dec 11, 2004 9:23 am
- Location: Near Dallas, TX
- Contact:
Re: entity converter
Hello,
Have you tried the options under the editor context menu and the 'Selection->Other' sub-menu? You can select some text and then convert characters to entities or vice versa.
There's not a great deal of control on which characters to change however, but if this is important to you then I can look into integrating a user function that can be used to better control how those functions work. Please let me know if you want me to try this and if you can test it, as well as more detail about what exactly you are wanting or needing to do.
But to keep things consistent, simple, and safe, you could probably just use the 'Change All Non-ASCII to References' option. This changes all selected characters above 127 to numeric character references.
Have you tried the options under the editor context menu and the 'Selection->Other' sub-menu? You can select some text and then convert characters to entities or vice versa.
There's not a great deal of control on which characters to change however, but if this is important to you then I can look into integrating a user function that can be used to better control how those functions work. Please let me know if you want me to try this and if you can test it, as well as more detail about what exactly you are wanting or needing to do.
But to keep things consistent, simple, and safe, you could probably just use the 'Change All Non-ASCII to References' option. This changes all selected characters above 127 to numeric character references.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial