Skip to content

Commit

Permalink
[] (0) Provide a hook for the XHR spec.
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11067

git-svn-id: http://svn.whatwg.org/webapps@5774 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 11, 2011
1 parent a26419a commit 48ecd3a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
15 changes: 11 additions & 4 deletions complete.html
Expand Up @@ -48849,14 +48849,22 @@ <h5 id=multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form dat

<!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->

<!-- NOTE: This algorithm is also used by the XHR spec -->

<p>The <dfn id=multipart/form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
algorithm</dfn> is as follows:</p>

<ol><!-- the first few steps of this are the same as in the previous section --><li><p>Let <var title="">result</var> be the empty string.</li>

<li>

<p>If the <code><a href=#the-form-element>form</a></code> element has an <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute,
<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
explicit character encoding to avoid the dependency on the
<code><a href=#the-form-element>form</a></code> element described in the next paragraph.)</p>

<p>Otherwise, if the <code><a href=#the-form-element>form</a></code> element has an <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute,
then, taking into account the characters found in the <var title="">form data set</var>'s names and values, and the character
encodings supported by the user agent, select a character encoding
from the list given in the <code><a href=#the-form-element>form</a></code>'s <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute
Expand All @@ -48880,9 +48888,8 @@ <h5 id=multipart-form-data><span class=secno>4.10.22.5 </span>Multipart form dat
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>

<ol><li><p>If the entry's name is "<code title=attr-fe-name-charset><a href=#attr-fe-name-charset>_charset_</a></code>"
and its type is "<code title="">hidden</code>", replace its value
with <var title="">charset</var>.</li>
<ol><li><p>If the entry's name is "<code title=attr-fe-name-charset><a href=#attr-fe-name-charset>_charset_</a></code>" and its type is
"<code title="">hidden</code>", replace its value with <var title="">charset</var>.</li>

<!-- the step that replaces a file with its name is missing in
this version of the algorithm -->
Expand Down
15 changes: 11 additions & 4 deletions index
Expand Up @@ -48831,14 +48831,22 @@ fur

<!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->

<!-- NOTE: This algorithm is also used by the XHR spec -->

<p>The <dfn id=multipart/form-data-encoding-algorithm><code title="">multipart/form-data</code> encoding
algorithm</dfn> is as follows:</p>

<ol><!-- the first few steps of this are the same as in the previous section --><li><p>Let <var title="">result</var> be the empty string.</li>

<li>

<p>If the <code><a href=#the-form-element>form</a></code> element has an <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute,
<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
explicit character encoding to avoid the dependency on the
<code><a href=#the-form-element>form</a></code> element described in the next paragraph.)</p>

<p>Otherwise, if the <code><a href=#the-form-element>form</a></code> element has an <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute,
then, taking into account the characters found in the <var title="">form data set</var>'s names and values, and the character
encodings supported by the user agent, select a character encoding
from the list given in the <code><a href=#the-form-element>form</a></code>'s <code title=attr-form-accept-charset><a href=#attr-form-accept-charset>accept-charset</a></code> attribute
Expand All @@ -48862,9 +48870,8 @@ fur
<p>For each entry in the <var title="">form data set</var>,
perform these substeps:</p>

<ol><li><p>If the entry's name is "<code title=attr-fe-name-charset><a href=#attr-fe-name-charset>_charset_</a></code>"
and its type is "<code title="">hidden</code>", replace its value
with <var title="">charset</var>.</li>
<ol><li><p>If the entry's name is "<code title=attr-fe-name-charset><a href=#attr-fe-name-charset>_charset_</a></code>" and its type is
"<code title="">hidden</code>", replace its value with <var title="">charset</var>.</li>

<!-- the step that replaces a file with its name is missing in
this version of the algorithm -->
Expand Down
17 changes: 13 additions & 4 deletions source
Expand Up @@ -54957,6 +54957,8 @@ fur

<!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->

<!-- NOTE: This algorithm is also used by the XHR spec -->

<p>The <dfn><code title="">multipart/form-data</code> encoding
algorithm</dfn> is as follows:</p>

Expand All @@ -54968,7 +54970,13 @@ fur

<li>

<p>If the <code>form</code> element has an <code
<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
explicit character encoding to avoid the dependency on the
<code>form</code> element described in the next paragraph.)</p>

<p>Otherwise, if the <code>form</code> element has an <code
title="attr-form-accept-charset">accept-charset</code> attribute,
then, taking into account the characters found in the <var
title="">form data set</var>'s names and values, and the character
Expand Down Expand Up @@ -54997,9 +55005,10 @@ fur

<ol>

<li><p>If the entry's name is "<code title="attr-fe-name-charset">_charset_</code>"
and its type is "<code title="">hidden</code>", replace its value
with <var title="">charset</var>.</p></li>
<li><p>If the entry's name is "<code
title="attr-fe-name-charset">_charset_</code>" and its type is
"<code title="">hidden</code>", replace its value with <var
title="">charset</var>.</p></li>

<!-- the step that replaces a file with its name is missing in
this version of the algorithm -->
Expand Down

0 comments on commit 48ecd3a

Please sign in to comment.