Summary: | [test case] <dt> isn't closed on </dl> | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Andy Neitzke <neitzke> |
Component: | khtml parsing | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
test case showing indent problem
improved test case which validates and shows indent problem another test case which doesn't have the problem and differs only by a leading <p> |
Description
Andy Neitzke
2003-11-14 02:25:19 UTC
Created attachment 3214 [details]
test case showing indent problem
You're aware that this is highly invalid HTML? Note, that all other browsers indent your test case at all. konqueror 3.1.4 doesn't render it like IE either, so I don't consider it a regression, we just changed the way we handle that broken HTML Just in case you know the author of that page: validator.w3.org says 707 errors for HTML 4.01 711 errors for HTML 3.2 Created attachment 3221 [details]
improved test case which validates and shows indent problem
Oops, my fault. Here is a better test case which validates properly and still
shows the problem. (Note that Mozilla does indent this test case.)
Created attachment 3222 [details] another test case which doesn't have the problem and differs only by a leading <p> If you delete the leading <p> tag then the problem goes away. Either way is valid HTML according to the validator. This behavior is similar to Bug 67916 so I guess it's possible they have a common origin. By the way, this bug also affects some pages on developer.kde.org, which might be considered "closer to home": see e.g. http://developer.kde.org/documentation/library/cvs-api/kdecore/html/structKCmdLineOptions.html Again, this page is rendered correctly by Mozilla. Subject: kdelibs/khtml CVS commit by mueller: fix handling of <p><dl> CCMAIL: 68167-done@bugs.kde.org M +2 -0 ChangeLog 1.150 M +8 -6 html/htmlparser.cpp 1.342 --- kdelibs/khtml/ChangeLog #1.149:1.150 @@ -1,4 +1,6 @@ 2004-01-11 Dirk Mueller <mueller@kde.org> + * html/htmlparser.cpp (insertNode): fix <p><dl> handling (#68167). + * css/css_base.cpp (extractPseudoType): make it case-insensitive (#72159). --- kdelibs/khtml/html/htmlparser.cpp #1.341:1.342 @@ -478,7 +478,9 @@ bool KHTMLParser::insertNode(NodeImpl *n case ID_DL: popBlock( ID_DT ); + if ( current->id() == ID_DL ) { e = new HTMLGenericElementImpl( document, ID_DD ); insertNode( e ); handled = true; + } break; case ID_DD: |