Comment by JimDabell

Comment by JimDabell 2 days ago

13 replies

> - XHTML. Have you ever read the parsing rules for HTML 5, where the semantics for bad HTML were formalized? Browsers should just punt at the first error, display an error message, and render the rest of the page in Times Roman. Would it kill people to have to close their tags properly?

Amen. Postel’s Law was wrong:

https://datatracker.ietf.org/doc/html/rfc9413

We stop at the first sign of trouble for almost every other format, we do not need lax parsing for HTML. This has caused a multitude of security vulnerabilities and only makes it more difficult for pretty much everybody.

The attitude towards HTML5 parsing seemed to grow out of this weird contrarianism that everybody who wanted to do better than whatever Internet Explorer did had their head in the clouds and that the role of a standard was just to write down all the bugs.

maratc 2 days ago

Just to remind you that <bold> <italic> text </bold> </italic> [0] that has been working for ages in every browser ever, is NOT a valid XHTML, and should be rejected by GP's proposal.

I, for one, is kinda happy that XHTML is dead.

[0]: By <bold> I mean <b> and by <italic> I mean <i>, and the reason it's not valid HTML is that the order of closing is not reverse of the order of opening as it should properly be.

  • JimDabell 2 days ago

    That caused plenty of incompatibilities in the past. At one point, Internet Explorer would parse that and end up with something that wasn’t even a tree.

    HTML is not a set of instructions that you follow. It’s a terrible format if you treat it that way.

  • reactordev 2 days ago

    It’s totally valid XHTML, just not recognized.

    XHTML allows you to use XML and <bold> <italic> are just XML nodes with no schema. The correct form has been and will always be <b> and <i>. Since the beginning.

    • yoz-y 2 days ago

      The problem there is the order of tags not their names.

      • reactordev 2 days ago

        Ooooo… now we’re talking. Sloppy HTML that closes a tag out of order or just declared out of order? Or rendering bugs when bold is before italic? It’s why XHTML should have been standard. Just dump, error out, make the developer fix it.

    • maratc 2 days ago

      I've edited my comment to better present the issue.

      • reactordev 2 days ago

        Out of order closure should definitely error out with an “unclosed italic tag detected at line:…” error.

        • maratc 2 days ago

          > It’s totally valid XHTML, just not recognized.

          Am I right in assuming that even you didn't notice the problem the first time you looked at it?

          > Out of order closure should definitely error out

          Hitchens's razor: "What can be asserted without evidence can also be dismissed without evidence."