4 ms·
In that case, which is HTML? Because it's meant for machines to read, so should be treated more carefully that pure 'text'. However, HTML shouldn't be processed
by rocqua 9y ago
In that case, which is HTML? Because it's meant for machines to read, so should be treated more carefully that pure 'text'. However, HTML shouldn't be processed like bytes either.
I suppose with HTML the real issue is that there is human readable text in there.
- nothrabannosir 9y agoHTML is serialisation of a DOM. It's not a sequence of text, but a semantic tree of it. Both encoded as sequential bytes, but different concepts when decoded.
- the8472 9y agoHTML5 is specified in terms of unicode characters and forbids most control and non-characters[0]. In that sense it is human-readable text. It's not easy to read, especially when minified. But so is shorthand or very dense scientific texts. Some things are meant to be human-readable and machine-parsable at the same time. Those things are not mutually exclusive. And sometimes humans will complain even more than machines if you mangle their text in any way. [0] https://html.spec.whatwg.org/#preprocessing-the-input-stream https://html.spec.whatwg.org/#preprocessing-the-input-stream