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

Re: Formatting ASP.NET code

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Thu, 15 Jul 2004 00:24:51 +0200
To: Tommi <tommiweb1@q1b.com>
Cc: html-tidy@w3.org
Message-ID: <40f6b09f.54433481@smtp.bjoern.hoehrmann.de>

* Tommi wrote:
>It want's me to specify each ASP.NET control type as it's own tag:
>asp:literal asp:placeholder and so on. Now for some weird reason all of 
>the asp tags I have inside the documents <head></head> portion get moved 
>inside the <body></body> tag after tidying. Am I missing something?

The problem here is that HTML 4.01 is defined so that any element that
is not defined to be allowed inside <head> causes the <head> element to
be closed, the body element be opened and then processed, i.e.


would be processed as if it were


Tidy does not know that your custom elements are allowed inside <head>
so it assumes they are not. So Tidy behaves as designed. We could make
a new configuration option to state which elements are allowed inside
<head> to solve this. We could also make it so that Tidy looks whether
there is a following </head> and assume that </head> is not misplaced,
but that would require major changes to the code. Do you have anything
else in mind to solve this problem?
Received on Wednesday, 14 July 2004 18:25:29 UTC

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