Isn't parsing html not like xml? I recall you need a special and weird algorithm to parse html properly. Was a long time ago though, dunno if that was "fixed".
That's largely correct. HTML5 changed the status quo from "eh, it should be XML but every browser applies its own weird hacks" to "well, the hacks still apply but at least they're defined by the standard now". The proper solution would have been XHTML, but we can't have nice things.
This seems to use html5ever[0], which is a "proper" HTML browser also used by the Servo browser.
So there is a rigorous definition of a brain damage parser for HTML.
Where is this defined already? Does it have a name?
That said, I recall clearly how the major browsers did sabotage xhtml, at the time (a decade ago). The middle-ground would be to go xml-like parsing but for html, namely without xml kludge.
16 comments
[ 2.5 ms ] story [ 40.8 ms ] threadJq is a nice tool, but...
This seems to use html5ever[0], which is a "proper" HTML browser also used by the Servo browser.
[0]: https://github.com/servo/html5ever
Where is this defined already? Does it have a name?
That said, I recall clearly how the major browsers did sabotage xhtml, at the time (a decade ago). The middle-ground would be to go xml-like parsing but for html, namely without xml kludge.
I guess if I ever write an HTML parser (noscript), I'll do it xml like.