Version: 3.4.1 (using KDE 3.4.1 Level "a" , SUSE 9.2 UNSUPPORTED) Compiler: gcc version 3.3.4 (pre 3.3.5 20040809) OS: Linux (i686) release 2.6.8-24.16-default Although this may formally not be seen as a bug, I report it nevertheless. In the following example, the <dl> tag is not closed. Technically spoken, the H2 tag should not indent, but it does. (only <dd> should) <dl> <dt>title</dt> <dd>description</dd> <h2>indented</h2> The reason I'm reporting this, is because sites with malformed html make Konqueror look bad this way. (this issue also does not occur in firefox)
SVN commit 542479 by carewolf: Match better the error-handling capabilities of Firefox with respect to DL/DT/DD elements. - Stand-alone DT now generate DLs. - Stand-alone DD are just generally allowed, but doesn't indent - <P> are made more frickle and will auto-close at the first sign of trouble. BUG: 121888 BUG: 112069 BUG: 109877 M +3 -0 css/html4.css M +4 -1 html/dtd.cpp M +23 -2 html/htmlparser.cpp --- branches/KDE/3.5/kdelibs/khtml/css/html4.css #542478:542479 @@ -271,6 +271,9 @@ dd { display: block; +} + +dl > dd { -khtml-margin-start: 40px; } --- branches/KDE/3.5/kdelibs/khtml/html/dtd.cpp #542478:542479 @@ -380,6 +380,7 @@ ID_BUTTON, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_INS, ID_DEL, @@ -425,6 +426,7 @@ ID_ADDRESS, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_MARQUEE, 0 @@ -502,6 +504,7 @@ ID_BUTTON, ID_COMMENT, ID_LI, + ID_DD, ID_XMP, ID_MARQUEE, 0 @@ -605,7 +608,7 @@ case ID_H5: case ID_H6: // _0 * - return check_array(childID, tag_list_0) || + return check_array(childID, tag_list_0) || (!strict && check_array(childID, tag_list_3) && (childID < ID_H1 || childID > ID_H6)); case ID_BASEFONT: case ID_BR: --- branches/KDE/3.5/kdelibs/khtml/html/htmlparser.cpp #542478:542479 @@ -366,6 +366,22 @@ HTMLElementImpl *e; bool handled = false; + // first switch on current element for a elements with optional end-tag + switch(current->id()) + { + case ID_P: + case ID_DD: + case ID_LI: + if(!n->isInline()) + { + popBlock(current->id()); + return insertNode(n); + } + break; + default: + break; + } + // switch according to the element to insert switch(id) { @@ -514,6 +530,13 @@ handled = true; } break; + case ID_DT: + e = new HTMLDListElementImpl(document); + if ( insertNode(e) ) { + insertNode(n); + return true; + } + break; case ID_AREA: { if(map) @@ -1179,8 +1202,6 @@ { case ID_HTML+ID_CLOSE_TAG: case ID_BODY+ID_CLOSE_TAG: - case ID_DT+ID_CLOSE_TAG: - case ID_DD+ID_CLOSE_TAG: // we never trust those close tags, since stupid webpages close // them prematurely return;
You need to log in before you can comment on or make changes to this bug.