Skip to content

Commit

Permalink
[ac] (2) Allow any label for referencing encodings, not just the offi…
Browse files Browse the repository at this point in the history
…cial name

Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@8109 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 31, 2013
1 parent 22ce3c3 commit 63d38c5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 27 deletions.
23 changes: 14 additions & 9 deletions complete.html
Expand Up @@ -13429,11 +13429,12 @@ <h5 id=pragma-directives><span class=secno>4.2.5.3 </span>Pragma directives</h5>
<a href=#character-encoding-declaration>character encoding declaration</a>. <span class=impl>This state's user agent
requirements are all handled by the parsing section of the specification.</span></p>

<!--CLEANUP-->
<p>For <code><a href=#the-meta-element>meta</a></code> elements with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code>
attribute in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration
state</a>, the <code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute must have a value
that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for a string that consists of: the literal
string "<code title="">text/html;</code>", optionally followed by any number of <a href=#space-character title="space character">space characters</a>, followed by the literal string "<code title="">charset=</code>", followed by the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character encoding</a> of the <a href=#character-encoding-declaration>character encoding
string "<code title="">text/html;</code>", optionally followed by any number of <a href=#space-character title="space character">space characters</a>, followed by the literal string "<code title="">charset=</code>", followed by aone of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character encoding</a> of the <a href=#character-encoding-declaration>character encoding
declaration</a>.</p>

<p>A document must not contain both a <code><a href=#the-meta-element>meta</a></code> element with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a> and a
Expand Down Expand Up @@ -13712,7 +13713,7 @@ <h5 id=charset><span class=secno>4.2.5.5 </span>Specifying the document's charac
encoding declarations</a>:</p>

<ul><li>The character encoding name given must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for
the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character
one of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character
encoding</a> used to serialize the file. <a href=#refsENCODING>[ENCODING]</a></li>

<li>The character encoding declaration must be serialized without the use of <a href=#syntax-charref title=syntax-charref>character references</a> or character escapes of any kind.</li>
Expand Down Expand Up @@ -14273,8 +14274,8 @@ <h4 id=the-script-element><span class=secno>4.3.1 </span>The <dfn id=script><cod

<p>The <dfn id=attr-script-charset title=attr-script-charset><code>charset</code></dfn> attribute gives the character
encoding of the external script resource. The attribute must not be specified if the <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is not present. If the attribute is set, its value
must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the <a href=#encoding-name title="encoding
name">name</a> of an <a href=#encoding>encoding</a>, and must specify the same <a href=#encoding>encoding</a> as
must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for one of the <a href=#encoding-label title="encoding
label">labels</a> of an <a href=#encoding>encoding</a>, and must specify the same <a href=#encoding>encoding</a> as
the <code title="">charset</code> parameter of the <a href=#content-type title=Content-Type>Content-Type
metadata</a> of the external file, if any. <a href=#refsENCODING>[ENCODING]</a></p>

Expand Down Expand Up @@ -44422,7 +44423,7 @@ <h4 id=categories><span class=secno>4.10.2 </span>Categories</h4>
character encodings that are to be used for the submission. If specified, the value must be an
<a href=#ordered-set-of-unique-space-separated-tokens>ordered set of unique space-separated tokens</a> that are <a href=#ascii-case-insensitive>ASCII
case-insensitive</a>, and each token must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for
the <a href=#encoding-name title="encoding name">name</a> of an <a href=#ascii-compatible-character-encoding>ASCII-compatible character
one of the <a href=#encoding-label title="encoding label">labels</a> of an <a href=#ascii-compatible-character-encoding>ASCII-compatible character
encoding</a>. <a href=#refsENCODING>[ENCODING]</a></p>

<p>The <dfn id=attr-form-name title=attr-form-name><code>name</code></dfn> attribute represents the
Expand Down Expand Up @@ -56239,6 +56240,7 @@ <h5 id=multipart-form-data><span class=secno>4.10.22.7 </span>Multipart form dat

<li>

<!--CLEANUP-->
<p>If the algorithm was invoked with an explicit character
encoding, let the selected character encoding be that encoding.
(This algorithm is used by other specifications, which provide an
Expand All @@ -56261,6 +56263,7 @@ <h5 id=multipart-form-data><span class=secno>4.10.22.7 </span>Multipart form dat

<li>

<!--CLEANUP-->
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>

Expand Down Expand Up @@ -56338,6 +56341,7 @@ <h5 id=multipart-form-data><span class=secno>4.10.22.7 </span>Multipart form dat

<h5 id=plain-text-form-data><span class=secno>4.10.22.8 </span>Plain text form data</h5>

<!--CLEANUP-->
<div class=impl>

<p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
Expand Down Expand Up @@ -99006,10 +99010,11 @@ <h3 id=text/html><span class=secno>16.1 </span><dfn><code>text/html</code></dfn>
<dd>
<dl><dt><code title="">charset</code></dt>
<dd>
<!--CLEANUP-->
<p>The <code title="">charset</code> parameter may be provided to definitively specify the
<a href="#document's-character-encoding">document's character encoding</a>, overriding any <a href=#character-encoding-declaration title="character encoding
declaration">character encoding declarations</a> in the document. The parameter's value
must be the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character
must be one of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character
encoding</a> used to serialize the file. <a href=#refsENCODING>[ENCODING]</a></p>
</dd>
</dl></dd>
Expand Down Expand Up @@ -101282,7 +101287,7 @@ <h3 class=no-num id=element-content-categories>Element content categories</h3>
<tr><th> <code title="">accept-charset</code>
<td> <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>form</a></code>
<td> Character encodings to use for <a href=#form-submission>form submission</a>
<td> <a href=#ordered-set-of-unique-space-separated-tokens>Ordered set of unique space-separated tokens</a>, <a href=#ascii-case-insensitive>ASCII case-insensitive</a>, consisting of <a href=#encoding-name title="encoding name">names</a> of <a href=#ascii-compatible-character-encoding title="ASCII-compatible character encoding">ASCII-compatible character encodings</a>*
<td> <a href=#ordered-set-of-unique-space-separated-tokens>Ordered set of unique space-separated tokens</a>, <a href=#ascii-case-insensitive>ASCII case-insensitive</a>, consisting of <a href=#encoding-label title="encoding label">labels</a> of <a href=#ascii-compatible-character-encoding title="ASCII-compatible character encoding">ASCII-compatible character encodings</a>*
<tr><th> <code title="">accesskey</code>
<td> <a href=#the-accesskey-attribute title=attr-accesskey>HTML elements</a>
<td> Keyboard shortcut to activate or focus element
Expand Down Expand Up @@ -101335,11 +101340,11 @@ <h3 class=no-num id=element-content-categories>Element content categories</h3>
<tr><th> <code title="">charset</code>
<td> <code title=attr-meta-charset><a href=#attr-meta-charset>meta</a></code>
<td> <a href=#character-encoding-declaration>Character encoding declaration</a>
<td> <a href=#encoding-name>Encoding name</a>*
<td> <a href=#encoding-label>Encoding label</a>*
<tr><th> <code title="">charset</code>
<td> <code title=attr-script-charset><a href=#attr-script-charset>script</a></code>
<td> Character encoding of the external script resource
<td> <a href=#encoding-name>Encoding name</a>*
<td> <a href=#encoding-label>Encoding label</a>*
<tr><th> <code title="">checked</code>
<td> <code title=attr-menuitem-checked><a href=#attr-menuitem-checked>menuitem</a></code>;
<code title=attr-input-checked><a href=#attr-input-checked>input</a></code>
Expand Down
23 changes: 14 additions & 9 deletions index
Expand Up @@ -13429,11 +13429,12 @@ people expect to have work and what is necessary.
<a href=#character-encoding-declaration>character encoding declaration</a>. <span class=impl>This state's user agent
requirements are all handled by the parsing section of the specification.</span></p>

<!--CLEANUP-->
<p>For <code><a href=#the-meta-element>meta</a></code> elements with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code>
attribute in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration
state</a>, the <code title=attr-meta-content><a href=#attr-meta-content>content</a></code> attribute must have a value
that is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for a string that consists of: the literal
string "<code title="">text/html;</code>", optionally followed by any number of <a href=#space-character title="space character">space characters</a>, followed by the literal string "<code title="">charset=</code>", followed by the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character encoding</a> of the <a href=#character-encoding-declaration>character encoding
string "<code title="">text/html;</code>", optionally followed by any number of <a href=#space-character title="space character">space characters</a>, followed by the literal string "<code title="">charset=</code>", followed by aone of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character encoding</a> of the <a href=#character-encoding-declaration>character encoding
declaration</a>.</p>

<p>A document must not contain both a <code><a href=#the-meta-element>meta</a></code> element with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute in the <a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration state</a> and a
Expand Down Expand Up @@ -13712,7 +13713,7 @@ people expect to have work and what is necessary.
encoding declarations</a>:</p>

<ul><li>The character encoding name given must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for
the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character
one of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character
encoding</a> used to serialize the file. <a href=#refsENCODING>[ENCODING]</a></li>

<li>The character encoding declaration must be serialized without the use of <a href=#syntax-charref title=syntax-charref>character references</a> or character escapes of any kind.</li>
Expand Down Expand Up @@ -14273,8 +14274,8 @@ c-end = "--&gt;"</pre>

<p>The <dfn id=attr-script-charset title=attr-script-charset><code>charset</code></dfn> attribute gives the character
encoding of the external script resource. The attribute must not be specified if the <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is not present. If the attribute is set, its value
must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the <a href=#encoding-name title="encoding
name">name</a> of an <a href=#encoding>encoding</a>, and must specify the same <a href=#encoding>encoding</a> as
must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for one of the <a href=#encoding-label title="encoding
label">labels</a> of an <a href=#encoding>encoding</a>, and must specify the same <a href=#encoding>encoding</a> as
the <code title="">charset</code> parameter of the <a href=#content-type title=Content-Type>Content-Type
metadata</a> of the external file, if any. <a href=#refsENCODING>[ENCODING]</a></p>

Expand Down Expand Up @@ -44422,7 +44423,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement>H
character encodings that are to be used for the submission. If specified, the value must be an
<a href=#ordered-set-of-unique-space-separated-tokens>ordered set of unique space-separated tokens</a> that are <a href=#ascii-case-insensitive>ASCII
case-insensitive</a>, and each token must be an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for
the <a href=#encoding-name title="encoding name">name</a> of an <a href=#ascii-compatible-character-encoding>ASCII-compatible character
one of the <a href=#encoding-label title="encoding label">labels</a> of an <a href=#ascii-compatible-character-encoding>ASCII-compatible character
encoding</a>. <a href=#refsENCODING>[ENCODING]</a></p>

<p>The <dfn id=attr-form-name title=attr-form-name><code>name</code></dfn> attribute represents the
Expand Down Expand Up @@ -56239,6 +56240,7 @@ fur

<li>

<!--CLEANUP-->
<p>If the algorithm was invoked with an explicit character
encoding, let the selected character encoding be that encoding.
(This algorithm is used by other specifications, which provide an
Expand All @@ -56261,6 +56263,7 @@ fur

<li>

<!--CLEANUP-->
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>

Expand Down Expand Up @@ -56338,6 +56341,7 @@ fur

<h5 id=plain-text-form-data><span class=secno>4.10.22.8 </span>Plain text form data</h5>

<!--CLEANUP-->
<div class=impl>

<p>The <dfn id=text/plain-encoding-algorithm><code title="">text/plain</code> encoding
Expand Down Expand Up @@ -99006,10 +99010,11 @@ if (s = prompt('What is your name?')) {
<dd>
<dl><dt><code title="">charset</code></dt>
<dd>
<!--CLEANUP-->
<p>The <code title="">charset</code> parameter may be provided to definitively specify the
<a href="#document's-character-encoding">document's character encoding</a>, overriding any <a href=#character-encoding-declaration title="character encoding
declaration">character encoding declarations</a> in the document. The parameter's value
must be the <a href=#encoding-name title="encoding name">name</a> of the <a href=#encoding title=encoding>character
must be one of the <a href=#encoding-label title="encoding label">labels</a> of the <a href=#encoding title=encoding>character
encoding</a> used to serialize the file. <a href=#refsENCODING>[ENCODING]</a></p>
</dd>
</dl></dd>
Expand Down Expand Up @@ -101282,7 +101287,7 @@ if (s = prompt('What is your name?')) {
<tr><th> <code title="">accept-charset</code>
<td> <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>form</a></code>
<td> Character encodings to use for <a href=#form-submission>form submission</a>
<td> <a href=#ordered-set-of-unique-space-separated-tokens>Ordered set of unique space-separated tokens</a>, <a href=#ascii-case-insensitive>ASCII case-insensitive</a>, consisting of <a href=#encoding-name title="encoding name">names</a> of <a href=#ascii-compatible-character-encoding title="ASCII-compatible character encoding">ASCII-compatible character encodings</a>*
<td> <a href=#ordered-set-of-unique-space-separated-tokens>Ordered set of unique space-separated tokens</a>, <a href=#ascii-case-insensitive>ASCII case-insensitive</a>, consisting of <a href=#encoding-label title="encoding label">labels</a> of <a href=#ascii-compatible-character-encoding title="ASCII-compatible character encoding">ASCII-compatible character encodings</a>*
<tr><th> <code title="">accesskey</code>
<td> <a href=#the-accesskey-attribute title=attr-accesskey>HTML elements</a>
<td> Keyboard shortcut to activate or focus element
Expand Down Expand Up @@ -101335,11 +101340,11 @@ if (s = prompt('What is your name?')) {
<tr><th> <code title="">charset</code>
<td> <code title=attr-meta-charset><a href=#attr-meta-charset>meta</a></code>
<td> <a href=#character-encoding-declaration>Character encoding declaration</a>
<td> <a href=#encoding-name>Encoding name</a>*
<td> <a href=#encoding-label>Encoding label</a>*
<tr><th> <code title="">charset</code>
<td> <code title=attr-script-charset><a href=#attr-script-charset>script</a></code>
<td> Character encoding of the external script resource
<td> <a href=#encoding-name>Encoding name</a>*
<td> <a href=#encoding-label>Encoding label</a>*
<tr><th> <code title="">checked</code>
<td> <code title=attr-menuitem-checked><a href=#attr-menuitem-checked>menuitem</a></code>;
<code title=attr-input-checked><a href=#attr-input-checked>input</a></code>
Expand Down

0 comments on commit 63d38c5

Please sign in to comment.