4 ms·
Parsers for invalid HTML are trivially easy to write: you literally just implement the spec, and that's not hard, and then you implement every major browser.
by gsnedders 9y ago
Parsers for invalid HTML are trivially easy to write: you literally just implement the spec, and that's not hard, and then you implement every major browser.
- nradov 9y agoYou're joking right? Sometimes it's hard to tell...
- gsnedders 9y agoI'm not joking. It's not that hard. You literally pick up the spec and implement it, it's mostly just fairly boring menial work.
- nradov 9y agoI think you misunderstood. There is no "spec" for handling all of the invalid HTML out there. That's part of what makes writing a browser so hard. It's far from being menial work.
- realityking 9y agoAFAIK all major browsers have converged on the parsing algorithm described in the HTML5 spec. It‘s super lenient and very messy but at least it‘s consistent. IMHO this was one of the biggest benefits coming out of the HTML5 efforts.
- gsnedders 9y agoIndeed. 15 years ago it was a huge amount of work reverse-engineering other browsers around parser behaviour; 10 years ago it was a huge amount of work finding where the draft spec broke sites; today it's pretty much just implementing the spec.