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>
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).
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
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.
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?
15 years ago
fixed by bug 179071