Closed Bug 233093 Opened 21 years ago Closed 21 years ago

XHTML: Self-closed elements (<script />) - closing tag not recognised

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 203398

People

(Reporter: md, Unassigned)

Details

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208

Some self-closed elements are not treated as closed - the element is left open.

This has been tested using the XHTML 1.0 Strict doctype, on Mozilla 1.5 and 1.6,
using a variety of Windows platforms.

Some elements should be self-closed: one example is a the script element when it
is used to load a javascript file from an external source.

EXAMPLE:
  <script language="Javascript" type="text/javascript" src="foo.js" />

RESULT:
  The page isn't rendered.

EXPECTED:
  The page should be displayed as if <script ...> </script> were used.


EXAMPLE:
  <p>Some initial text and <a id="anchor1" />more text</p>

RESULTS:
  Everything from the <a /> element until the end of the block (</p> is rendered
as if it were a link.

EXPECTED:
  The <a /> element should not affect the following inline text.

Reproducible: Always
Steps to Reproduce:
1.Create a valid webpage.
2.In the head element, create a self-closed <script /> element
3.

Actual Results:  
Page won't render

Expected Results:  
Page should render.
Unless you're serving the pages as application/xhtml+xml or application/xml
(which I bet you're not), that syntax is not valid.  See bugs 225323 and 203398.

*** This bug has been marked as a duplicate of 203398 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Verified.  To be served as text/html, XHTML must follow the guidelines in
Appendix C of the XHTML spec, which the XHTML you describe does not.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.