[webkit-changes] cvs commit: WebCore/khtml/xml xml_tokenizer.cpp

Eric eseidel at opensource.apple.com
Thu Dec 29 21:43:24 PST 2005


eseidel     05/12/29 21:43:24

  Modified:    .        ChangeLog
               khtml/xml xml_tokenizer.cpp
  Log:
  Bug #: 6290
  Submitted by: eseidel
  Reviewed by: mjs
          XML documents with "html" in dtd name use XHTML entities when they shouldn't
          http://bugzilla.opendarwin.org/show_bug.cgi?id=6290
  
          * khtml/xml/xml_tokenizer.cpp:
          (khtml::externalSubsetHandler): check for exact xhtml types
  
  Revision  Changes    Path
  1.63      +10 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- ChangeLog	30 Dec 2005 05:40:06 -0000	1.62
  +++ ChangeLog	30 Dec 2005 05:43:23 -0000	1.63
  @@ -2,6 +2,16 @@
   
           Reviewed by mjs.
   
  +        XML documents with "html" in dtd name use XHTML entities when they shouldn't
  +        http://bugzilla.opendarwin.org/show_bug.cgi?id=6290
  +
  +        * khtml/xml/xml_tokenizer.cpp:
  +        (khtml::externalSubsetHandler): check for exact xhtml types
  +
  +2005-12-29  Eric Seidel  <eseidel at apple.com>
  +
  +        Reviewed by mjs.
  +
           Close leak in CollectionInfo due to HashMap migration
           http://bugzilla.opendarwin.org/show_bug.cgi?id=6295
   
  
  
  
  1.62      +10 -2     WebCore/khtml/xml/xml_tokenizer.cpp
  
  Index: xml_tokenizer.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/xml/xml_tokenizer.cpp,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- xml_tokenizer.cpp	29 Dec 2005 23:49:04 -0000	1.61
  +++ xml_tokenizer.cpp	30 Dec 2005 05:43:23 -0000	1.62
  @@ -666,8 +666,16 @@
   
   static void externalSubsetHandler(void *closure, const xmlChar *name, const xmlChar *externalId, const xmlChar *systemId)
   {
  -    if (toQString(name).contains("html"))
  -        getTokenizer(closure)->setIsXHTMLDocument(true);
  +    QString extId = toQString(externalId);
  +    if ((extId == "-//W3C//DTD XHTML 1.0 Transitional//EN")
  +        || (extId == "-//W3C//DTD XHTML 1.1//EN")
  +        || (extId == "-//W3C//DTD XHTML 1.0 Strict//EN")
  +        || (extId == "-//W3C//DTD XHTML 1.0 Frameset//EN")
  +        || (extId == "-//W3C//DTD XHTML Basic 1.0//EN")
  +        || (extId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN")
  +        || (extId == "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN")
  +        || (extId == "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"))
  +        getTokenizer(closure)->setIsXHTMLDocument(true); // controls if we replace entities or not.
   }
   
   void XMLTokenizer::finish()
  
  
  



More information about the webkit-changes mailing list