Closed Bug 285800 Opened 20 years ago Closed 20 years ago

Page rendering fails badly if the tag that linked in the external .js is closed in a single tag, rather than two

Categories

(Core :: DOM: Core & HTML, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: rmann, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

In the page at http://latencyzero.com/, a tag like <script>writeEmail("foo","bar","baz","com")</script> 
is used to call a JavaScript function that makes a few document.write() calls to render a mailto: <a> tag.

If the <script> tag in the <head> is written like this:

	<script src="scripts.js" type="text/javascript"/>

then the subsequent calls fail, and the page renders very badly. If instead the <script> tag is called like 
this:

	<script src="scripts.js" type="text/javascript"></script>

then all is well. You'll note that the first instance is perfectly valid XML, and that the page validates 
without error or warning at http://validator.w3.org/



Reproducible: Always

Steps to Reproduce:
1. Go to http://www.latencyzero.com/index-bad.html
2. Note bad rendering
3. http://www.latencyzero.com/index.html, which is identical to the other, except it closes the script 
tag with a separate </script>
4. Note that it works.
Actual Results:  
Most of the  page fails to render

Expected Results:  
The entire page should have rendered.

Similar behavior occurs in IE/Win. Safari works fine.

XHTML compatibility seems poor.
Possibly related to Bug #107058, #88309, #247996
Rick, your page isn't XHTML since it is served as text/html.
> You'll note that the first instance is perfectly valid XML

But the page is served as text/html, which means it MUST follow appendix C of
the XHTML specification.  Which it doesn't.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.