This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If a web page contains JavaScript in which a string conatins Html like text, then errors can be incorrectly highlighted. Mainly seems to be strings shaped like closing tags which cause the error. For exapmle, if you validate the Html listed below, the validator reports: Error Line 7 column 43: end tag for element "H2" which is not open But that tag is simply part of a string constant and is not html. Its certainly not invlaid. I have done this both through file upload and direct input here is the page to try: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Test Validator</title> <script language="JavaScript" type="text/javascript"> var aStringVariable = "<h2>just testing</h2>"; </script> </head> <body> No content, just testing validator </body> </html>
Sorry, found details excusing the problem in the faq. It still seems wrong to me though...