tidy and scripts

Hi all.
I am using tidy to tidy up and pretty-print HTML files generated using
Openjade.
It has worked fine since months (years ?), but I have now to include some
scripts in my HTML, and I am getting problems.

Here is an input (very simple):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<html
><head
><title
>Titre</title
></head
><body
><script
>document.writeln ("</frameset></frameset></frameset>" ) ;
</script
></body
></html
>
and the output (I run tidy with options -i -raw)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Titre</title>
  </head>

  <body>
<script type="text/javascript">
document.writeln ("<\/frameset><\/frameset><\/frameset>" ) ;
<\/script
><\/body
><\/html
>
</script>
  </body>
</html>

So, the <\/frameset> are not what I want. And the last tags are strangely
mangled and appear twice.  This seems to happen only with script. Did I
oversee an option ?
Note : I get the same result if I replace:
document.writeln ("<\/frameset><\/frameset><\/frameset>" ) ;
by
blahblah

Does anyione have an idea?
TIA. Jany

Any views or opinions expressed are solely those of the author and do not
necessarily represent those of IBM.
Jany Quintard - IBM Paris Laboratory - Application & Integration Middleware
Division

Received on Friday, 7 September 2001 04:20:26 UTC