W3C home > Mailing lists > Public > www-validator@w3.org > May 1999

Re: A bug in the validator...

From: Kynn Bartlett <kynn@idyllmtn.com>
Date: Wed, 26 May 1999 23:13:14 -0700
Message-Id: <4.1.19990526230848.016409b0@mail.idyllmtn.com>
To: "Tony L. Svanstrom" <tony@svanstrom.com>
Cc: www-validator@w3.org
At 10:09 PM 5/26/1999 , Tony L. Svanstrom wrote:
>As you can see it's a simple JavaScript that improves the "this page
>validates"-code so that you don't have to change it for every page.

Out of curiousity, why not use http://validator.w3.org/check/referer
for this?

Anyway, last time this came up, Liam Quinn wrote

>From <http://www.w3.org/TR/REC-html40/types.html#idx-CDATA-1>:
'Although the STYLE and SCRIPT elements use CDATA for their data model, for 
these elements, CDATA must be handled differently by user agents. Markup 
and entities must be treated as raw text and passed to the application as 
is. The first occurrence of the character sequence "</" (end-tag open 
delimiter) is treated as terminating the end of the element's content. In 
valid documents, this would be the end tag for the element.'

So you need to escape your </tag>:
<script language="JavaScript" type="text/javascript"> 
document.write ('<some really long tag '); 
document.write ('with lots of data><\/tag>'); 
// --> 

Hope this helps.

Kynn Bartlett  <kynn@idyllmtn.com>                   http://www.kynn.com/
Chief Technologist, Idyll Mountain Internet      http://www.idyllmtn.com/
Become AWARE of Web Accessibility!                  http://aware.hwg.org/
Myths about Web Accessibility                  http://www.kynn.com/+myths
Received on Thursday, 27 May 1999 02:13:27 UTC

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