<?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>9280</bug_id>
          
          <creation_ts>2006-06-02 15:10:15 -0700</creation_ts>
          <short_desc>Quirksmode: Trailing ]&gt; from internal DTD subset is rendered as body text</short_desc>
          <delta_ts>2012-08-15 19:20:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>420+</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>9610</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adele Peterson">adele</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ap</cc>
    
    <cc>bugs-webkit</cc>
    
    <cc>chortos</cc>
    
    <cc>fhp.mail</cc>
    
    <cc>hyatt</cc>
    
    <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>44464</commentid>
    <comment_count>0</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2006-06-02 15:10:15 -0700</bug_when>
    <thetext>http://www.quirksmode.org/bugreports/archives/safari/index.html

&quot;When creating custom DTDs like the one below, all browsers except Opera see the end of the ATTLIST as the end of the DOCTYPE. The result is that they print &quot;]&gt;&quot; on the screen.

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;
[
&lt;!ATTLIST p behavior CDATA #IMPLIED&gt;
]&gt;

Test page. http://www.quirksmode.org/oddsandends/dtd.html
Workaround is not included
Reported by ppk.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47036</commentid>
    <comment_count>1</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-06-24 14:17:58 -0700</bug_when>
    <thetext>Moving this into component XML, though i&apos;m not quite sure it&apos;s the correct one..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47046</commentid>
    <comment_count>2</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-06-24 14:27:42 -0700</bug_when>
    <thetext>Changing to correct component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48845</commentid>
    <comment_count>3</comment_count>
      <attachid>9274</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2006-07-08 10:41:17 -0700</bug_when>
    <thetext>Created attachment 9274
html test case

The original test case is served as text/html, but has a DTD based on XHTML 1.0 Transitional, which has caused some concerns about its correctness (see the comments at quirksmode.org). The attached test case has a DTD based on HTML 4.01 Strict; it exposes the same behavior - the validator accepts it (and parses as expected, which can be seen in its outline view), while major browsers don&apos;t.

I am not sure whether this document really is valid HTML - its DTD is not HTML 4.01 Strict, since it has an internal subset. HTML 4.01 explicitly lists the three DTDs used in HTML documents, and this is not one of them.

I have found discussions of this issue from as early as 1995 &lt;http://1997.webhistory.org/www.lists/www-html.1995q2/0379.html&gt;, but nothing authoritative enough to ignore the results of the W3C validator. Mozilla documentation seems to imply that they do handle internal subsets in HTML &lt;http://developer.mozilla.org/en/docs/Mozilla&apos;s_DOCTYPE_sniffing&gt;, but I&apos;m not seeing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107895</commentid>
    <comment_count>4</comment_count>
    <who name="Oleg Oshmyan">chortos</who>
    <bug_when>2009-02-01 08:58:43 -0800</bug_when>
    <thetext>*** Bug 23673 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107897</commentid>
    <comment_count>5</comment_count>
    <who name="Oleg Oshmyan">chortos</who>
    <bug_when>2009-02-01 09:06:21 -0800</bug_when>
    <thetext>This bug is still there. Both HTML and XHTML are affected.

Besides, I think a better summary would be what I wrote in my bug report (before finding this one):
Trailing ]&gt; from internal DTD subset is rendered as body text</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107904</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2009-02-01 10:00:37 -0800</bug_when>
    <thetext>Good suggestion, renaming.

We need to check what HTML5 has to say about this issue. Note however that I cannot reproduce this with XHTML (and the document at URL given in bug 23673 is plain HTML, see &lt;http://hixie.ch/advocacy/xhtml&gt; for more detail).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107908</commentid>
    <comment_count>7</comment_count>
    <who name="Oleg Oshmyan">chortos</who>
    <bug_when>2009-02-01 10:32:10 -0800</bug_when>
    <thetext>My fault. Sorry about that, should be fixed now.

Actually... I have to admit that the bug indeed does not appear when the page is XHTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>281414</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-09-20 00:35:49 -0700</bug_when>
    <thetext>We&apos;re parsing this correct w.r.t. HTML5.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>696638</commentid>
    <comment_count>9</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2012-08-15 19:20:15 -0700</bug_when>
    <thetext>*** Bug 94149 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9274</attachid>
            <date>2006-07-08 10:41:17 -0700</date>
            <delta_ts>2006-07-08 10:41:17 -0700</delta_ts>
            <desc>html test case</desc>
            <filename>entity.html</filename>
            <type>text/html</type>
            <size>298</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMDEvL0VOIgogICAgICAg
ICAgICAiaHR0cDovL3d3dy53My5vcmcvVFIvaHRtbDQvc3RyaWN0LmR0ZCIKWwo8IUVOVElUWSBu
dyAibm93aGVyZS5jb20iPgpdPgo8aHRtbD4KPGhlYWQ+CjxtZXRhIGh0dHAtZXF1aXY9IkNvbnRl
bnQtVHlwZSIgY29udGVudD0idGV4dC9odG1sO2NoYXJzZXQ9aXNvLTg4NTktMSI+Cjx0aXRsZT5U
ZXN0IG9mIGV4dHJhIHN0dWZmPC90aXRsZT4KPC9oZWFkPgo8Ym9keT4KPHA+Jm53OzwvcD4KPC9i
b2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>