W3C home > Mailing lists > Public > www-validator@w3.org > April 2005

comments in javascript

From: Bill Milbratz <bmilbratz@outstart.com>
Date: Fri, 15 Apr 2005 18:24:31 -0500
To: www-validator@w3.org
Message-Id: <1113607471.8681.36.camel@localhost>


This seems like such a basic issue that it would come up often. However
I didn't see this precise issue in the mailing list archives. Nor did
the script section of the WDG "common validation problems" cover this

The w3-c validator marks as invalid Html-4.01-transitional the following
lines. It does not like the comment indicator on line 2 ('//') or the
url on line 3 below:

1.  <script type="text/javascript">
2.    // Do something
3.    window.location="/mywebapp/index.html";
4.  </script>

I understand that this would cause an error:

but must I/you/we escape *every* forward slash between the <script>


bill m
Received on Friday, 15 April 2005 23:24:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:45 UTC