Re: CSP errors as HTML errors

 Jens Oliver Meiert (jens@meiert.org) wrote:

>
> when analyzing various websites, I noticed that CSP errors are reported
> and counted as HTML errors, as on Pinterest:
> https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.pinterest.com%2F
>
> This is a problem as it breaks with the expectation that the HTML
> validator validates HTML.


I’m afraid the old idea of “HTML validation” is a lost cause. Originally,
it meant SGML validation against an HTML DTD. This was useful, but rather
theoretical, since there never was any implementation of HTML as an SGML
application.

For some years, “HTML validation” has been checks against a description
that may and will change without prior notice, using mixed technology, and
the very concept of “HTML” is mutable.

Your example contains an error message about a CSS error. In the old days,
it was clear that HTML and CSS are two distinct technologies. Whether this,
or messages about HTTP headers, are counted as HTML errors in some
summaries is an interesting issue, but I do not see any such counts.
Anyway, if such counts are shown, HTML errors should not include anything
that happens in HTTP headers or in CSS code or in JavaScript code.

I suppose the purpose is good: analyze and report anything that might be a
problem and inform the user about them, whether it is HTML, HTTP, CSS,
JavaScript, or whatever, But it may and will confuse people who think that
a program named “Nu Html Checker” should check HTML, and just HTML

Yucca, https://jkorpela.fi

Received on Saturday, 28 October 2023 19:07:59 UTC