This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6357 - <script> start tag parsing
Summary: <script> start tag parsing
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Keywords: NoReply
Depends on:
Reported: 2009-01-05 16:28 UTC by Anne
Modified: 2010-10-04 14:47 UTC (History)
3 users (show)

See Also:


Description Anne 2009-01-05 16:28:33 UTC
Both Presto and WebKit currently handle a self-closing flag on a <script> element start tag in a special way.

In WebKit it always pops the element of the stack.

In Presto it pops the element of the stack if a src attribute with a non-empty value is also present.

Gecko and Trident do not handle the flag in a special way.

WebKit style parsing breaks at least this page:[^%3E]*/%3E

It is unfortunately near impossible for Opera and WebKit to change behavior drastically due to deployed Dashboard and Opera widgets. (Introducing differences between Web page and widget rendering would be theoretically possible (and admittedly WebKit has done this for <canvas>), but is not desirable.)

I would like to do more research into what pages would break and which would work better, but unfortunately Philips' tool cannot be used.
Comment 1 Ian 'Hixie' Hickson 2009-01-05 22:51:12 UTC
I'm not changing the spec just because certain UAs reuse the same codebase for non-Web environments, that doesn't make sense. Especially since, as you point out, it causes problems.
Comment 2 Anne 2009-01-06 15:00:50 UTC breaks in Firefox (and probably IE?).

I haven't found a site yet that breaks in Opera due to this issue and some sites using code like this would work "better":

  <script src='' type='text/javascript'/>
  <script type='text/javascript'>
    _uacct = 'UA-1723287-3';

E.g. and
Comment 3 Maciej Stachowiak 2010-03-14 13:16:06 UTC
This bug predates the HTML Working Group Decision Policy.

If you are satisfied with the resolution of this bug, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

This bug is now being moved to VERIFIED. Please respond within two weeks. If this bug is not closed, reopened or escalated within two weeks, it may be marked as NoReply and will no longer be considered a pending comment.