- From: Daniel Marschall <info@daniel-marschall.de>
- Date: Wed, 18 Feb 2009 00:07:17 +0100
- To: <www-validator@w3.org>
- Message-ID: <A9CA50623DAF4F97A022F8C1F3E2B69B@ako>
Dear Sir or Madam. I think I have found a bug in the validator check tool. I made a Anti-Spam-Mechanism which outputs following html code: <script language="JavaScript" type="text/javascript"><!-- document.write("<a href=\"");document.write("m");document.write("a");document.write("i");document.write("l");document.write("t");document.write("o");document.write(":");document.write("i");document.write("n");document.write("f");document.write("o");document.write("@");document.write("e");document.write("x");document.write("a");document.write("m");document.write("p");document.write("l");document.write("e");document.write(".");document.write("c");document.write("o");document.write("m");document.write("\">");document.write("i");document.write("n");document.write("f");document.write("o");document.write("@");document.write("e");document.write("x");document.write("a");document.write("m");document.write("p");document.write("l");document.write("e");document.write(".");document.write("c");document.write("o");document.write("m");document.write("</a>");// --></script> Note: This is a JavaScript, it should be ignored by the validator! It has no line breaks to make it a bit more complex. Now, let's put the code into a valid (X-)HTML page and check it with W3C-Validator. When checked as XHTML 1.0 Transitional: Valid! When checked an HTML 4.01 Transitional: NOT valid! It says, that the closed Tag </a> was not opened. But this </a> is inside the <!-- and --> because of the JavaScript! So, it should not be an error! So, what can I do, that my HTML 4.01 document is detected as valid? Or is it a bug of W3C that should be solved? Best regards, Daniel Marschall
Received on Wednesday, 18 February 2009 14:19:34 UTC