Empty script element in xhtml header bug

RESOLVED DUPLICATE of bug 151506

Status

()

RESOLVED DUPLICATE of bug 151506
14 years ago
14 years ago

People

(Reporter: cito, Assigned: bugzilla)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225

The following page does not show up with the empty script element in the header
written as
<script src="nomatter.js" />
If you write
<script src="nomatter.js"></script>
instead, everything works fine.

---------------------------

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script src="nomatter.js" />
</head>
<body>
<h1>Hello</h1>
<script>/* nothing */</script>
</body>
</html>

Reproducible: Always

Steps to Reproduce:
Load the xhtml given in the details.
Actual Results:  
The "Hello" heading does not show up.

Expected Results:  
You get the expected result when you change
<script src="nomatter.js" />
to
<script src="nomatter.js"></script>

The XHTML standard says: Empty-element tags MAY be used for any element which
has no content, whether or not it is declared using the keyword EMPTY.

Comment 1

14 years ago
The HTML compatibility guidelines http://www.w3.org/TR/xhtml1/#guidelines , in
particular C.3, apply if you use a text/html MIME type. 

*** This bug has been marked as a duplicate of 151506 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.