Re: Tidy's handling of <noscript>

On 18 Aug 2001, at 19:23, Paul wrote: 

> My HTML contains a sequence like this:
> 
> <html>
> <head>
> 
> <script>
> <!--
>   some script statements here
> // stop hiding -->
> </script>
> 
> <noscript>
> show this stuff when scripting not enabled
> </noscript>
> 
> </head>
> 
> <body> ....
> 
> Tidy's output moves the <noscript> block to within <body>; specifically as
> the very first thing after <body>.

Seems the best place for it. Where were you expecting it to go? 

What it's actually doing is: 1. finding <noscript> outside of <body> 
2. inserting </head><body> so <noscript> is in the right place 
3. deleting the now-superfluous <body> you supplied 


> When I move the <noscript> block before the <script> block and tidy again,
> the tidy output now has BOTH
> the <noscript> and the <script> block within <body>; neither is in <head>
> any longer.
> 
> Can anyone shed some light on this behavior? -v shows 30th April, 2000

The explanation above covers this case too: Tidy isn't "moving" 
anything, it's inserting the missing <body> prior to <noscript>. 

Received on Monday, 20 August 2001 04:52:28 UTC