<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>6290</bug_id>
          
          <creation_ts>2005-12-29 16:56:35 -0800</creation_ts>
          <short_desc>XML documents with &quot;html&quot; in dtd name use XHTML entities when they shouldn&apos;t</short_desc>
          <delta_ts>2006-01-31 21:20:40 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Misc.</component>
          <version>420+</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.hixie.ch/tests/adhoc/xml/parsing/010.xml</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>4301</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Eric Seidel (no email)">eric</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27177</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-12-29 16:56:35 -0800</bug_when>
    <thetext>Currently any XML file with a DOCTYPE whose &quot;name&quot; part is &quot;html&quot; triggers
&quot;HTML&quot; parsing mode. This is wrong. It should be based on the PUBLIC identifier.

TESTCASE: http://www.hixie.ch/tests/adhoc/xml/parsing/010.xml

This is a regression caused by bug 4301.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27179</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-12-29 17:02:01 -0800</bug_when>
    <thetext>This is such a trivial edgecase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27182</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-12-29 17:11:02 -0800</bug_when>
    <thetext>Not that much of an edgecase, XHTML2 will likely trip this, and even if XHTML2
isn&apos;t much in use today, it eventually may be. It would be sad for XHTML2
authors if they were confused by old builds of Safari.

The bug is that externalSubsetHandler() is checking |name|, but should be
checking |externalId|. Here are the IDs to compare against (taken from Mozilla&apos;s
list, with the MathML DTDs removed):

   &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
   &quot;-//W3C//DTD XHTML 1.1//EN&quot;
   &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
   &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot;
   &quot;-//W3C//DTD XHTML Basic 1.0//EN&quot;
   &quot;-//WAPFORUM//DTD XHTML Mobile 1.0//EN&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27184</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-12-29 17:36:23 -0800</bug_when>
    <thetext>Calling this a regression is pretty strong language.  As far as I can tell this test case only &quot;passed&quot; before, 
because html entities were not supported in xhtml at all in Safari.  Perhaps in the expat days this test case 
passed for valid reasons.  Now html entities are supported in anything that looks like an xhtml document.  
This one happens to look enough like xhtml that we treat it as one.  Eventually, we&apos;ll need a HashSet, and 
a list of allowed doc types.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27186</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-12-29 17:38:49 -0800</bug_when>
    <thetext>Why not just a set of six string comparisons in the place of the one comparison
you have now? You&apos;ll almost always either match the first one or not enter the
function, so it shouldn&apos;t be a perf hit.

It&apos;s a regression because before you used to not have this bug, and now you do.
That&apos;s what a regression is: the introduction of a new bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27193</commentid>
    <comment_count>5</comment_count>
      <attachid>5364</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2005-12-29 18:36:07 -0800</bug_when>
    <thetext>Created attachment 5364
fix &amp; test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27196</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2005-12-29 19:01:28 -0800</bug_when>
    <thetext>You have this line:

+        || (extId == &quot;-//W3C//DTD XHTML Basic 1.0//EN&quot;)

...in there twice. (In the Mozilla codebase they have the MathML 2.0 DOCTYPE
where you have the second occurance, but you don&apos;t want to put that in because
that isn&apos;t XHTML and has different entities. It&apos;s probably sort-of ok to have
the XHTML+MathML DOCTYPEs in there, I guess, though. It&apos;ll at least work for
some pages, anyway.)

Other than that, looks great. Thanks. :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27202</commentid>
    <comment_count>7</comment_count>
      <attachid>5364</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2005-12-29 20:00:49 -0800</bug_when>
    <thetext>Comment on attachment 5364
fix &amp; test

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29396</commentid>
    <comment_count>8</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-01-22 04:56:38 -0800</bug_when>
    <thetext>Removing keyword(s) since bug is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29420</commentid>
    <comment_count>9</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-01-22 05:01:00 -0800</bug_when>
    <thetext>Removing keyword(s) since bug is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30863</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2006-01-31 21:20:40 -0800</bug_when>
    <thetext>Removing Regression keyword from bugs already fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>5364</attachid>
            <date>2005-12-29 18:36:07 -0800</date>
            <delta_ts>2005-12-29 20:00:49 -0800</delta_ts>
            <desc>fix &amp; test</desc>
            <filename>non-xhtml.patch</filename>
            <type>text/plain</type>
            <size>4303</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">SW5kZXg6IExheW91dFRlc3RzL2Zhc3QvcGFyc2VyL3hodG1sLWFsdGVybmF0ZS1lbnRpdGllcy1l
eHBlY3RlZC50eHQKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTogeGh0bWwtYWx0ZXJuYXRlLWVudGl0aWVz
LWV4cGVjdGVkLnR4dApkaWZmIC1OIExheW91dFRlc3RzL2Zhc3QvcGFyc2VyL3hodG1sLWFsdGVy
bmF0ZS1lbnRpdGllcy1leHBlY3RlZC50eHQKLS0tIExheW91dFRlc3RzL2Zhc3QvcGFyc2VyL3ho
dG1sLWFsdGVybmF0ZS1lbnRpdGllcy1leHBlY3RlZC50eHQJMSBKYW4gMTk3MCAwMDowMDowMCAt
MDAwMAorKysgTGF5b3V0VGVzdHMvZmFzdC9wYXJzZXIveGh0bWwtYWx0ZXJuYXRlLWVudGl0aWVz
LWV4cGVjdGVkLnR4dAkzMCBEZWMgMjAwNSAwMjozNToyNSAtMDAwMApAQCAtMCwwICsxLDI5IEBA
CitsYXllciBhdCAoMCwwKSBzaXplIDgwMHg2MDAKKyAgUmVuZGVyQ2FudmFzIGF0ICgwLDApIHNp
emUgODAweDYwMAorbGF5ZXIgYXQgKDAsMCkgc2l6ZSA4MDB4MTQ4CisgIFJlbmRlckJsb2NrIHto
dG1sfSBhdCAoMCwwKSBzaXplIDgwMHgxNDgKKyAg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yAgICAgICAgfHwgKGV4dElkID09ICItLy9XM0MvL0RU
RCBYSFRNTCBCYXNpYyAxLjAvL0VOIikKKyAgICAgICAgfHwgKGV4dElkID09ICItLy9XM0MvL0RU
RCBYSFRNTCAxLjEgcGx1cyBNYXRoTUwgMi4wLy9FTiIpCisgICAgICAgIHx8IChleHRJZCA9PSAi
LS8vVzNDLy9EVEQgWEhUTUwgMS4xIHBsdXMgTWF0aE1MIDIuMCBwbHVzIFNWRyAxLjEvL0VOIikK
KyAgICAgICAgfHwgKGV4dElkID09ICItLy9XM0MvL0RURCBYSFRNTCBCYXNpYyAxLjAvL0VOIikK
KyAgICAgICAgfHwgKGV4dElkID09ICItLy9XQVBGT1JVTS8vRFREIFhIVE1MIE1vYmlsZSAxLjAv
L0VOIikpCisgICAgICAgIGdldFRva2VuaXplcihjbG9zdXJlKS0+c2V0SXNYSFRNTERvY3VtZW50
KHRydWUpOyAvLyBjb250cm9scyBpZiB3ZSByZXBsYWNlIGVudGl0aWVzIG9yIG5vdC4KIH0KIAog
dm9pZCBYTUxUb2tlbml6ZXI6OmZpbmlzaCgpCg==
</data>
<flag name="review"
          id="1136"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>