[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/html
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2006-06-04 23:03:23
Message-ID: 1149462203.358217.16611.nullmailer () svn ! kde ! org
[Download RAW message or body]

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;
             }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic