W3C home > Mailing lists > Public > www-html@w3.org > April 2007

Re: HTML5 script start tag should select appropriate content model according to src

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Mon, 23 Apr 2007 00:19:31 +1000
Message-ID: <462B6EF3.4010006@lachy.id.au>
To: David Woolley <forums@david-woolley.me.uk>
CC: www-html@w3.org

David Woolley wrote:
> The claim on the lynx-dev list was that a real problem was being caused 
> because, unamed popular browsers were treating <script src=.... /> as 
> empty, whereas Lynx was eating the following code in CDATA mode.  Their 
> analysis was that <tag /> means <tag></tag> in modern HTML, but that is 
> not born out by the HTML5 lexical rules, and would be an undesirable of 
> XHTML behaviour into HTML.
> http://lists.gnu.org/archive/html/lynx-dev/2007-04/msg00019.html

Actually, the parsing of script in current browsers is quite complex and 
mostly non-interoperable.

Safari does indeed treat <script /> and <script src=""/> as an empty 
element for HTML, though it treats <script/> as a normal start tag.

In Firefox 2, once it hits the end of file (EOF), it will go back, close 
the script element and reparse everything after the start tag.

IE and Opera just keep parsing until they hit EOF.

The spec is defined much closer to IE and Operas behaviour because 
reparsing has both performance and potential security issues.

In any case, lynx should attempt to follow the HTML5 spec, as that is 
what browsers will be implementing.  Implementation feedback from them 
would also be very welcome.

Lachlan Hunt
Received on Sunday, 22 April 2007 14:19:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:15 UTC