W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

Re: tidy and scripts

From: Richard A. O'Keefe <ok@atlas.otago.ac.nz>
Date: Mon, 10 Sep 2001 12:14:12 +1200 (NZST)
Message-Id: <200109100014.MAA259810@atlas.otago.ac.nz>
To: html-tidy@w3.org, jany.quintard@fr.ibm.com
"Jany Quintard" <jany.quintard@fr.ibm.com> wrote:
	It has worked fine since months (years ?), but I have now to include some
	Here is an input (very simple):
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
	>document.writeln ("</frameset></frameset></frameset>" ) ;

The <script> element ends there.  There was a rather nasty design botch
in SGML, which HTML inherited.  Elements whose content is CDATA or
RCDATA end at the first "</", even if it is not followed by the right

	and the output (I run tidy with options -i -raw)
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
	    <meta name="generator" content="HTML Tidy, see www.w3.org">
	<script type="text/javascript">
	document.writeln ("<\/frameset><\/frameset><\/frameset>" ) ;
	So, the <\/frameset> are not what I want.

They may not be what you WANT, but they are most certainly what you NEED.

	And the last tags are strangely
	mangled and appear twice.

Basically caused by the same problem, I believe.
Fix the script does that it does not contain a literal "</" anywhere,
and see what you get.
Received on Sunday, 9 September 2001 20:14:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:50 UTC