Closed Bug 264994 Opened 20 years ago Closed 20 years ago

Address and Heading can contain block elements

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Maniac, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041006 Firefox/0.10.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041006 Firefox/0.10.1

Both HTML Strict DTD and XHTML 1.0 Strict DTD say that <address> and (heading)
could contain only inline elements. However Gecko successfully allows:

- <p> and <ul> inside <address> and <h1> in XHTML
- <p> inside <address> and <p>, <ul> inside <h1> in HTML

Funny it doesn't allow <ul> to be inside <address> in HTML.

Side note: In fact, for HTML any behavior would be technically approptiate due
to lack of specified error handling but still current behavior doesn't seem logical.

Testcases follow.

P.S. Hope I guessed the component right :-)

Reproducible: Always
Steps to Reproduce:
Attached file HTML Testcase
Attached file XHTML Testcase
> Both HTML Strict DTD and XHTML 1.0 Strict DTD say

Gecko is not a validating parser.  So for your XHTML testcase the behavior is
entirely correct.  For the tag-soup testcase, any behavior is valid, as you
note; our behavior is chosen for compat with existing sites while still
enforcing a modicum of the HTML containment rules.
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.

Attachment

General

Creator:
Created:
Updated:
Size: