W3C home > Mailing lists > Public > www-validator@w3.org > June 2020

Bug in HTML validator

From: Anony Mous <fyngyrz@gmail.com>
Date: Wed, 10 Jun 2020 12:13:15 -0600
Message-ID: <CANv=BrrTz6ZQ3K+kL5yC5KdgAW=okbGto28hHh8B2SQKfjYwOQ@mail.gmail.com>
To: www-validator@w3.org
Validator reports this problem:

Bug indication:

 *Line 32
Column 115*: end tag for element "FONT" which is not open

…ntById("result").innerHTML = "<font color=\"#ff0000\">Error</font>";  return; }


The Validator found an end tag for the above element, but that element is
not currently open. This is often caused by a leftover end tag from an
element that was removed during editing, or by an implicitly closed element
(if you have an error related to an element being used where it is not
allowed, this is almost certainly the case). In the latter case this error
will disappear as soon as you fix the original problem.

Here's the line from within <script></script> tags:

   1. if (isNaN(vlinefreq)) { document.getElementById("result").innerHTML =
   "<font color=\"#ff0000\">Error</font>"; return; }

....as can be seen, the tags are within a quoted string inside a script, and
they are both present and correct.

The validator (probably) does not understand that it is reading a script,
and it is trying to parse the script content as if it were straight HTML.
It isn't. It shouldn't be treated that way.

Also, the script opening tag correctly calls out the script type...

script type="text/javascript"

...so there i's a clear indication to the validator of the context.


A -- it should not try to parse HTML within <SCRIPT></SCRIPT>
B -- it needs to understand that \" within "" is not a valid "

....probably A.
Received on Friday, 12 June 2020 02:52:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 12 June 2020 02:52:39 UTC