Fix for 3882299, missing content on gibson.com. Change our handling of ...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2005 23:46:03 +0000 (23:46 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Jan 2005 23:46:03 +0000 (23:46 +0000)
other browsers.

        Reviewed by Maciej

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::parseTag):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8338 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/htmltokenizer.cpp

index 45e31ca962a0c090065acf2403a57807cfb182d8..7e78ac0bc8ab6309f10b367d9a9902554497cff9 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-11  David Hyatt  <hyatt@apple.com>
+
+        Fix for 3882299, missing content on gibson.com.  Change our handling of " and ' in certain states of the parser to match
+       other browsers.
+       
+        Reviewed by Maciej
+
+        * khtml/html/htmltokenizer.cpp:
+        (khtml::HTMLTokenizer::parseTag):
+
 2005-01-11  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/3930733> Mail prints second page of email blank
index 4229244e1883e857d1e404897f41ecf93183bacd..57c1148909ce3c5d35537e5aafa4b4e054452b7f 100644 (file)
@@ -1060,16 +1060,10 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
             ushort curchar;
             while(!src.isEmpty()) {
                 curchar = *src;
-                if(curchar > ' ') {
+                // In this mode just ignore any quotes we encounter and treat them like spaces.
+                if (curchar > ' ' && curchar != '\'' && curchar != '"') {
                     if (curchar == '<' || curchar == '>')
                         tag = SearchEnd;
-                    else if(atespace && (curchar == '\'' || curchar == '"'))
-                    {
-                        tag = SearchValue;
-                        *dest++ = 0;
-                        attrName = QString::null;
-                        attrNamePresent = false;
-                    }
                     else
                         tag = AttributeName;
 
@@ -1150,7 +1144,8 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
             bool atespace = false;
             while(!src.isEmpty()) {
                 curchar = src->unicode();
-                if(curchar > ' ') {
+                // In this mode just ignore any quotes we encounter and treat them like spaces.
+                if (curchar > ' ' && curchar != '\'' && curchar != '"') {
                     if(curchar == '=') {
 #ifdef TOKEN_DEBUG
                         kdDebug(6036) << "found equal" << endl;
@@ -1158,13 +1153,6 @@ void HTMLTokenizer::parseTag(TokenizerString &src)
                         tag = SearchValue;
                         ++src;
                     }
-                    else if(atespace && (curchar == '\'' || curchar == '"'))
-                    {
-                        tag = SearchValue;
-                        *dest++ = 0;
-                        attrName = QString::null;
-                        attrNamePresent = false;
-                    }
                     else {
                         currToken.addAttribute(parser->docPtr()->document(), buffer, attrName, emptyAtom);
                         dest = buffer;