W3C home > Mailing lists > Public > www-validator@w3.org > May 2022

Re: "end tag for element" refers to non-existent FAQ entry

From: Jukka K. Korpela <jukkakk@gmail.com>
Date: Mon, 30 May 2022 14:58:18 +0300
Message-ID: <CAGHxYa5h_fSVG=5Q3GXQnnw_geHHjWtkhXD5dmBg9YzVtt6Xiw@mail.gmail.com>
To: Brian Bors <brian.bors@gmail.com>
Cc: W3C WWW Validator <www-validator@w3.org>
Brian Bors (brian.bors@gmail.com) wrote:

> The "end tag for element "???" which is not open" error has a line in
> it's description. " If this error occurred in a script section of your
> document, you should probably read this FAQ entry
> <https://validator.w3.org/docs/help.html#faq-javascript>. "
> This link refers to a FAQ entry that no longer exists and should be
> removed (or the FAQ entry re-instated).

This indeed happens when you submit an HTML 4.01 document that contains a
homeless end tag. The link refers to
The fragment reference #faq-javascript used to refer the subsection “The
validator complains about something in my JavaScript!”, which seems to have
been removed around a year ago (after being there for two decades).

However, for example, the April 20, 2021 version
does not contain anything that I can see as relating to the homeless end
tag issue. So just restoring the subsection would not help here.

I suppose the was to point out that inside a <script> element, a construct
var foo = "</p>"
would cause the string </p> to be recognized as markup, implicitly closing
the <script> element and causing other error messages, too, including the
somewhat confusing message about </script> terminating an element that is
not open. It might be useful to tell this, but as far as I can, the FAQ
never told it.

I suggest that the sentence be removed from the error message.
Alternatively, an explanation like the one I outlined above could be added
to the FAQ

Jukka, https://jkorpela.fi/
Received on Monday, 30 May 2022 11:58:45 UTC

This archive was generated by hypermail 2.4.0 : Monday, 30 May 2022 11:58:46 UTC