W3C home > Mailing lists > Public > www-validator@w3.org > July 2007

Re: Validating one of my web pages

From: Michael Adams <linux_mike@paradise.net.nz>
Date: Sat, 07 Jul 2007 17:09:37 +1200
To: www-validator@w3.org
Cc: Otto Wyss <otto.wyss@orpatec.ch>
Message-id: <20070707170937.155975c6.linux_mike@paradise.net.nz>

On Fri, 06 Jul 2007 21:35:20 +0200
Otto Wyss wrote:

> 
> Michael Adams wrote:
> > That document highlights the issue AND offers the solution. If you 
> > escape the slash in your code on line 40 your page will be valid. ie
> > This: ...'" class="folder">'+folders[i]+'</div>'); to this: ...'"
> > class="folder">'+folders[i]+'<\/div>');
> > 
> True, but this backslash is a rather silly hack around a problem the
> validator should be able to handle correct. The offening '</div>' is
> clearly within a text which may never be interpreted as code by the
> validator. On the other side even when interpreted it should be
> accepted as correct since the code within the full text is obvious
> valid standard compliant and not even especially complicated.
> 
> So the validator should either stop interpreting texts as code or
> should be able to handle Javascript correctly as any decent browser
> can do these days.
> 
> >  problem is one thing and creating side issues around poor code is 
> > onother.
> > 
> Sorry if I get upset, my code is not poor, elso show me first how to
> do it better.
> 
> > Otto; all browsers try to make allowances ...
> 
> I quiet well know that. Yet if you still think my code needs these 
> allowances I have to assume you have no idea about real world 
> programming. Besides this single problem my code is valid throughout
> the full web site and this problem isn't because my code is wrong!
> 

quoting the previously referenced document.
http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1

*** QUOTE ***
When script or style data is the content of an element (SCRIPT and
STYLE), the data begins immediately after the element start tag and ends
at the first ETAGO ("</") delimiter followed by a name start character
([a-zA-Z]); note that this may not be the element's end tag. Authors
should therefore escape "</" within the content. Escape mechanisms are
specific to each scripting or style sheet language.

ILLEGAL EXAMPLE:
The following script data incorrectly contains a "</" sequence...
*** END QUOTE ***

If it is illegal then your code is wrong. Period!

-- 
Michael
Linux: The OS people choose without $200,000,000 of persuasion.
Received on Saturday, 7 July 2007 05:10:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:25 GMT