Bug 128616

Summary: Rendering bug at www.raiffeisen.at
Product: [Applications] konqueror Reporter: JG <jg>
Component: khtml parsingAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: HI    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description JG 2006-06-04 14:22:21 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8) 
OS:                Linux

hi,

"www.raiffeisen.at" is the homepage of one of the largest banks in austria and it gets rendered completely f'd up in every konqueror version i tried (at least all 3.5.x are affected). many site elements are missing (form fields, ...) and completely misplaced and there is nearly no text shown. 

safari (v2.0.3) on MAC is also affected, firefox and opera show the page fine. i don't know if it is poor website design or a khtml thing. if you think it is a problem with their code i'll report it to them too as the page is really unusable.

JG
Comment 2 JG 2006-06-04 18:35:38 UTC
hehe, nice.. or not :) i guess i'll ask them to fix those errors then..

thanks
JG
Comment 3 Allan Sandfeld 2006-06-04 23:06:42 UTC
It's caused by <!--BEGIN-- rai_left -->

So a regression in SGML comment parsing
Comment 4 Allan Sandfeld 2006-06-04 23:35:00 UTC
SVN commit 548216 by carewolf:

Don't assume that a website that sends us a broken crappy DOCTYPE is going
to be even remotely parsable in strict mode.


BUG: 128616


 M  +2 -2      html_documentimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_documentimpl.cpp #548215:548216
@@ -475,8 +475,8 @@
             // Look up the entry in our gperf-generated table.
             const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr, publicID.length());
             if (!doctypeEntry) {
-                // The DOCTYPE is not in the list.  Assume strict mode.
-                pMode = Strict;
+                // The DOCTYPE is not in the list.  Assume compatible mode.
+                pMode = Compat;
                 hMode = Html4;
                 return;
             }
Comment 5 Allan Sandfeld 2006-06-05 01:03:31 UTC
SVN commit 548236 by carewolf:

Copy Mozilla doctype detection instead.
Simplify spaces in the doctype string, but keep the "broken doctypes means
strict HTML" behavior.
CCBUG: 128616


 M  +4 -3      html_documentimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_documentimpl.cpp #548235:548236
@@ -399,7 +399,7 @@
 
         // We need to trim whitespace off the public identifier.
         publicID = buffer.mid(publicIDStart, publicIDEnd - publicIDStart);
-        publicID = publicID.stripWhiteSpace();
+        publicID = publicID.simplifyWhiteSpace();
         *resultFlags |= PARSEMODE_HAVE_PUBLIC_ID;
     } else {
         if (containsString("system", buffer, index)) {
@@ -475,8 +475,9 @@
             // Look up the entry in our gperf-generated table.
             const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr, publicID.length());
             if (!doctypeEntry) {
-                // The DOCTYPE is not in the list.  Assume compatible mode.
-                pMode = Compat;
+                // The DOCTYPE is not in the list.  Assume strict mode.
+                // ### Doesn't make any sense, but it's what Mozilla does.
+                pMode = Strict;
                 hMode = Html4;
                 return;
             }
Comment 6 JG 2006-06-05 16:53:50 UTC
thanks very much! tested it and works very well!

now i only have to find out why rendering of http://last.fm is broken in 3.5.3, in 3.5.2 it worked fine.. guess this will be a new bug report :)

JG