- From: olivier Thereaux <ot@w3.org>
- Date: Sun, 1 Aug 2004 17:11:49 +0900
- To: Scott Eade <seade@backstagetech.com.au>
- Cc: www-validator@w3.org
Received on Sunday, 1 August 2004 04:12:00 UTC
Hi Scott, Short answer: you're probably better off calling an external script than struggling with the necessary escaping when embedding scripts within HTML. slightly longer answer follows... On Jul 30, 2004, at 12:57, Scott Eade wrote: > I don't mind so much that the JavaScript variable assignment is being > examined for valid mark-up This feels like a misunderstanding: the validator does not read within scripts just because that may be a fun thing to do, but because it is the way it is supposed to parse the document. > , but if it is then it would be nice if the opening tag was also > detected. The more correct thing to do is to probably not validate > JavaScript variable assignments (or better still validate them as > stand alone fragments). I am sure you read > <http://validator.w3.org/docs/help.html#faq-javascript>. which points to http://www.htmlhelp.com/tools/validator/problems.html#script which states: [[ the first occurrence of "</" followed by any letter is considered the end tag for the SCRIPT element ]] You'll need to escape any instance of </ in your scripts. -- olivier
Received on Sunday, 1 August 2004 04:12:00 UTC