[html5] r2556 - [ac] (0) Require <meta charset> within the first 512 bytes. (credit: hs)
whatwg at whatwg.org
whatwg at whatwg.org
Wed Dec 24 00:18:11 PST 2008
Author: ianh
Date: 2008-12-24 00:18:10 -0800 (Wed, 24 Dec 2008)
New Revision: 2556
Modified:
index
source
Log:
[ac] (0) Require <meta charset> within the first 512 bytes. (credit: hs)
Modified: index
===================================================================
--- index 2008-12-24 07:01:38 UTC (rev 2555)
+++ index 2008-12-24 08:18:10 UTC (rev 2556)
@@ -8643,7 +8643,7 @@
<dl class=element><dt>Categories</dt>
<dd><a href=#metadata-content-0>Metadata content</a>.</dd>
<dt>Contexts in which this element may be used:</dt>
- <dd>If the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is present, or if the element is in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: as the first element in a <code><a href=#the-head-element>head</a></code> element.</dd>
+ <dd>If the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is present, or if the element is in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-head-element>head</a></code> element.</dd>
<dd>If the <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute is present, and the element is not in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-head-element>head</a></code> element.</dd>
<dd>If the <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute is present, and the element is not in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a>: in a <code><a href=#the-noscript-element>noscript</a></code> element that is a child of a <code><a href=#the-head-element>head</a></code> element.</dd>
<dd>If the <code title=attr-meta-name><a href=#attr-meta-name>name</a></code> attribute is present: where <a href=#metadata-content-0>metadata content</a> is expected.</dd>
@@ -8689,10 +8689,8 @@
<p>The <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute may
be specified in <a href=#html5 title=HTML5>HTML documents</a> only, it
- must not be used in <a href=#xhtml5 title=XHTML>XML documents</a>. If the
- <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute is
- specified, the element must be the first element in <a href=#the-head-element-0>the
- <code>head</code> element</a> of the file.</p>
+ must not be used in <a href=#xhtml5 title=XHTML>XML documents</a>. There
+ must not be more than one element with a <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute per document.</p>
<p>The <dfn id=attr-meta-content title=attr-meta-content><code>content</code></dfn>
attribute gives the value of the document metadata or pragma
@@ -8988,11 +8986,8 @@
<p>If the document contains a <code><a href=#meta>meta</a></code> element in the
<a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding
- declaration state</a> then that element must be the first
- element in the document's <code><a href=#the-head-element>head</a></code> element, and the
- document must not contain a <code><a href=#meta>meta</a></code> element with the
- <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute
- present.</p>
+ declaration state</a>, then the document must not contain a
+ <code><a href=#meta>meta</a></code> element with the <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute present.</p>
<p>The <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding
declaration state</a> may be used in <a href=#html5 title=HTML5>HTML
@@ -9206,6 +9201,10 @@
the use of <a href=#syntax-charref title=syntax-charref>character references</a>
or character escapes of any kind.</li>
+ <li id=charset512>The element containing the character encoding
+ declaration must be serialised completely within the first 512
+ bytes of the document.
+
</ul><p>If the document does not start with a BOM, and if its encoding is
not explicitly given by <a href=#content-type-0 title=Content-Type>Content-Type
metadata</a>, then the character encoding used must be an
Modified: source
===================================================================
--- source 2008-12-24 07:01:38 UTC (rev 2555)
+++ source 2008-12-24 08:18:10 UTC (rev 2556)
@@ -8986,7 +8986,7 @@
<dt>Categories</dt>
<dd><span>Metadata content</span>.</dd>
<dt>Contexts in which this element may be used:</dt>
- <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: as the first element in a <code>head</code> element.</dd>
+ <dd>If the <code title="attr-meta-charset">charset</code> attribute is present, or if the element is in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>head</code> element.</dd>
<dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>head</code> element.</dd>
<dd>If the <code title="attr-meta-http-equiv">http-equiv</code> attribute is present, and the element is not in the <span title="attr-meta-http-equiv-content-type">Encoding declaration state</span>: in a <code>noscript</code> element that is a child of a <code>head</code> element.</dd>
<dd>If the <code title="attr-meta-name">name</code> attribute is present: where <span>metadata content</span> is expected.</dd>
@@ -9038,10 +9038,9 @@
<p>The <code title="attr-meta-charset">charset</code> attribute may
be specified in <span title="HTML5">HTML documents</span> only, it
- must not be used in <span title="XHTML">XML documents</span>. If the
- <code title="attr-meta-charset">charset</code> attribute is
- specified, the element must be the first element in <span>the
- <code>head</code> element</span> of the file.</p>
+ must not be used in <span title="XHTML">XML documents</span>. There
+ must not be more than one element with a <code
+ title="attr-meta-charset">charset</code> attribute per document.</p>
<p>The <dfn title="attr-meta-content"><code>content</code></dfn>
attribute gives the value of the document metadata or pragma
@@ -9387,11 +9386,9 @@
<p>If the document contains a <code>meta</code> element in the
<span title="attr-meta-http-equiv-content-type">Encoding
- declaration state</span> then that element must be the first
- element in the document's <code>head</code> element, and the
- document must not contain a <code>meta</code> element with the
- <code title="attr-meta-charset">charset</code> attribute
- present.</p>
+ declaration state</span>, then the document must not contain a
+ <code>meta</code> element with the <code
+ title="attr-meta-charset">charset</code> attribute present.</p>
<p>The <span title="attr-meta-http-equiv-content-type">Encoding
declaration state</span> may be used in <span title="HTML5">HTML
@@ -9649,6 +9646,10 @@
the use of <span title="syntax-charref">character references</span>
or character escapes of any kind.</li>
+ <li id="charset512">The element containing the character encoding
+ declaration must be serialised completely within the first 512
+ bytes of the document.</p>
+
</ul>
<p>If the document does not start with a BOM, and if its encoding is
More information about the Commit-Watchers
mailing list