- From: Neil Soiffer <Neils@dessci.com>
- Date: Thu, 3 Apr 2008 10:59:11 -0700
- To: "Henri Sivonen" <hsivonen@iki.fi>
- Cc: "HTML WG" <public-html@w3.org>, "Public MathML mailing list" <www-math@w3.org>
- Message-ID: <d98bce170804031059g504b8955x1116bc855cee7c5e@mail.gmail.com>
I'm getting a little confused. It seems like the following is true: - <script/> is treated like <script> in all browsers -- it will match against </script> - In all browsers, an unclosed script is not executed - Firefox v1 and v2 differ in how they treat unterminated scripts, but that difference is irrelevant for this case. Are those true? I'm unclear how inferred "body" tags get added when a script is unclosed, but it seems like the contents of the script get put in that instead of inside of a script element. I suspect that this detail is irrelevant to the discussion. I think that the gist of my misunderstanding stemmed from the fact that the original example wasn't really one that illustrated (well) that <script/> is treated like <script> . The second example, where you include a closing script tag does indeed illustrate this and shows that to be the case for all browsers. It seems like the consensus is that for MathML and SVG namespaces (and maybe any non-HTML namespace), <foo/> should be considered empty. Nothing breaks in HTML because of this, and it enables MathML, SVG, and other XML-based syntaxes. Assuming that is true, that seems like a very positive development from this thread. Neil Soiffer Senior Scientist Design Science, Inc. www.dessci.com ~ Makers of Equation Editor, MathType, MathPlayer and MathFlow ~ On Thu, Apr 3, 2008 at 8:17 AM, Henri Sivonen <hsivonen@iki.fi> wrote: > On Apr 3, 2008, at 18:03, Neil Soiffer wrote: > > > However, I found that both Opera 9.5beta and Firefox 2 both treated > > <script/> as an empty tag, which differs from what you found. I'm puzzled > > why I found a different behavior in Opera, and why Firefox 2 would differ > > from FireFox 3. > > > > It seems to me that Opera 9.5 beta did not treat <script/> as empty. > Instead, when it hit EOF when parsing the script element contents, it didn't > append a the contents as a text node to the script element and then > proceeded to infer a body start upon EOF. > > You can verify that Opera 9.5 beta normally shows the text child of script > in the DOM: > > http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A%3Cscript%2F%3E%0D%0A%20w(%22Dangerous%22)%3B%0D%0A%3C%2Fscript%3E%0D%0A%3Cbody%3EA<http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0D%0A%3Cscript%2F%3E%0D%0A%20w%28%22Dangerous%22%29%3B%0D%0A%3C%2Fscript%3E%0D%0A%3Cbody%3EA> > > You can also verify that the body element is inferred and not created by > what looks like the tag: > > http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0D%0A%3Cscript%2F%3E%0D%0A%20w(%22Dangerous%22)%3B%0D%0A%3Cbody%20class%3D%22foo%22%3EA<http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0D%0A%3Cscript%2F%3E%0D%0A%20w%28%22Dangerous%22%29%3B%0D%0A%3Cbody%20class%3D%22foo%22%3EA> > > I think the Firefox case is this: > https://bugzilla.mozilla.org/show_bug.cgi?id=305873 > > > -- > Henri Sivonen > hsivonen@iki.fi > http://hsivonen.iki.fi/ > > >
Received on Thursday, 3 April 2008 17:59:48 UTC