Bug 145108 (dl)

DL isn't nested if DT or DD don't have the end tag

RESOLVED FIXED

Status

()

Core
HTML: Parser
RESOLVED FIXED
16 years ago
15 years ago

People

(Reporter: Koike Kazuhiko, Assigned: harishd)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Hixie-P1], URL)

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
DL isn't nested if DT or DD don't have the end tag.

<dl>
  <dt>Title
  <dd>Data
      <dl>
	<dt>Nested Title
	<dd>Nested data
      </dl>
  </dd>
</dl>
(Reporter)

Comment 1

16 years ago
Created attachment 83948 [details]
testcase

Comment 2

16 years ago
This bug happens when the file starts with

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

or 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

but not if there is no DOCTYPE (i.e., bug does not occur in quirks mode).

Comment 3

16 years ago
Note it also fails to indent nested dl if nested dl is not within <dd>...</dd>,
as in:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Final//EN">
<html>
<body>
<dl>
  <dt>Title1</dt>
  <dd>Data1</dd>
  <dl>
	<dt>Nested title1a not in Data1 dd</dt>
	<dd>Nested data1a not in Data1 dd</dd>
  </dl>

  <dt>Title2</dt>
  <dd>Data2
    <dl>
	<dt>Nested Title2a in Data2 dd</dt>
	<dd>Nested data2a in Data2 dd</dd>
    </dl>
  </dd>
</dl>
</body>
</html>

on 2002053012 (1.0), pc, w2k

Comment 4

16 years ago
This seems to be closely related with bug# 100466. Regression?
New testcase: http://www.hixie.ch/tests/adhoc/html/parsing/003.html

I'd consider quite major. I think it might explain why the nested definition
lists in the DOM specs render incorrectly.
Alias: dl
Whiteboard: [Hixie-P1]
Created attachment 102653 [details]
Test case variation ( based on attachment 83948 [details] )

There is a interesting phenomena.
Corruptted DOM structures are different between 2 cases;
 (A) <DT> is NOT closed. Following <DD> is closed, which is just before </DL>.
 (B) <DT> is closed. Following <DD> is NOT closed, which is just before </DL>.

Was cotrol block for nesting destryed?
Or was nesting level counter mis-calcurated?
Depends on: 179071
fixed by bug 179071
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.