Yesterday I said that browsers should stop accepting malformed HTML, but people (rightfully) pointed out that for legacy reasons they can't do that.
Solution: Introduce a "strict-parsing" header (like the JS "use strict") which only allows properly formed HTML.
@njha This essentially already exists in the form of Content-Type: application/xhtml+xml
@alexbuzzbee Just played with a request editor- this doesn't seem to reject some (all???) types of malformed HTML.
Ex. Google uses it but they still had a bug which involved malformed HTML as user input.
@njha At least according to the specifications, XHTML is supposed to be parsed with a strict XML parser. It's possible that browsers don't always do that.
@alexbuzzbee Oof, looks like no one follows the spec then.
(Tested on Safari, Firefox, Chrome)
@njha There's a lot of stuff where that's the case, unfortunately.
Fosstodon is a Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.