Bug 9370 - Nothing rendered when missing ending </script> tag
Summary: Nothing rendered when missing ending </script> tag
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 417.x
Hardware: Mac (Intel) OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.host41.com/
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-08 21:11 PDT by Alex Shanks
Modified: 2008-02-22 20:31 PST (History)
5 users (show)

See Also:


Attachments
Webarchive of original revision for the website (3.70 KB, application/octet-stream)
2006-06-08 21:19 PDT, Alex Shanks
no flags Details
Original source (No </script> in <head> javascript) (4.31 KB, text/html)
2006-06-09 12:23 PDT, Alex Shanks
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Shanks 2006-06-08 21:11:58 PDT
When trying to access www.host41.com, nothing is rendered - page is blank (except for the <title> of the page, at the top of the window). When you go to "View Source" in Safari, the HTML markup is there. In other browsers (mainly Gecko-based ones) the website loads fine.

Someone on IRC noted that it is missing a </script> tag, and that is probably why, but I thought maybe this bug report would help maintain compatibility with Mozilla-based browsers.
Comment 1 Alex Shanks 2006-06-08 21:19:20 PDT
Created attachment 8779 [details]
Webarchive of original revision for the website

The webmaster has changed the site to fix a Javascript error, that caused it to not render correctly.

I'm attaching a webarchive of the original version.

You can keep the bug open if you still want to use it to help maintain Gecko compatibility.
Comment 2 David Kilzer (:ddkilzer) 2006-06-09 01:27:05 PDT
See also Bug 3905 and Bug 6314.
Comment 3 Joost de Valk (AlthA) 2006-06-09 01:29:35 PDT
I'm inclined to go even further, i'd guess that any unclosed tag in the head SHOULD be closed on head close, amd that the three bugs about unclosed <style>, <script> and <title> are in fact dupes of the same problem.
Comment 4 David Kilzer (:ddkilzer) 2006-06-09 02:10:26 PDT
(In reply to comment #3)
> I'm inclined to go even further, i'd guess that any unclosed tag in the head
> SHOULD be closed on head close, amd that the three bugs about unclosed <style>,
> <script> and <title> are in fact dupes of the same problem.

On the surface it looks that way, but it's a little more complex than this.  Each tag has its own handling code and thus must be special-cased.  Also when the tag appears in the <head>, this is a different code path than when the tag appears in the <body>.

I got stuck a couple months ago on Bug 3905 and Bug 6314 when someone found a page in production that cause the tokenizer (and parser?) to "run out" of HTML to process while a page was loading, but only because the network couldn't feed the tokenizer/parser fast enough.  I need a reproducible test case for this condition before I can fix the bug, and it's going to have to be an http test.

I was also hoping that not looking at the tokenizer/parser code for a couple months would give me some fresh ideas when I went back to it.
Comment 5 David Kilzer (:ddkilzer) 2006-06-09 02:26:22 PDT
(In reply to comment #1)
> Created an attachment (id=8779) [edit]
> Webarchive of original revision for the website

Alex, could you upload the HTML source of the original web site?  The webarchive file doesn't contain the full, original HTML document.
Comment 6 Alex Shanks 2006-06-09 12:23:45 PDT
Created attachment 8787 [details]
Original source (No </script> in <head> javascript)

I didn't have a copy of the original source, but I talked with the webmaster and he said that he just moved the script to the bottom of <body> and added </script>.
Comment 7 David Kilzer (:ddkilzer) 2008-02-22 18:41:28 PST
What does HTML5 say about this?

Comment 8 Ian 'Hixie' Hickson 2008-02-22 19:51:46 PST
Script is only closed by </script> or EOF, for security reasons.
Comment 9 David Kilzer (:ddkilzer) 2008-02-22 20:31:07 PST
This matches HTML5 behavior.  Closing as RESOLVED/INVALID.  See Comment #8.