W3C home > Mailing lists > Public > public-html-commits@w3.org > October 2010

html5/spec association-of-controls-and-forms.html,1.35,1.36 spec.html,1.1281,1.1282 the-input-element.html,1.17,1.18

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 12 Oct 2010 00:16:50 +0000
To: public-html-commits@w3.org
Message-Id: <E1P5SXy-0006nt-VO@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv26117

Modified Files:
	association-of-controls-and-forms.html spec.html 
	the-input-element.html 
Log Message:
<input type=reset> resets <input type=file> too, oops (whatwg r5601)

[updated by splitter]


Index: association-of-controls-and-forms.html
===================================================================
RCS file: /sources/public/html5/spec/association-of-controls-and-forms.html,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- association-of-controls-and-forms.html	30 Sep 2010 08:16:39 -0000	1.35
+++ association-of-controls-and-forms.html	12 Oct 2010 00:16:48 -0000	1.36
@@ -1631,7 +1631,7 @@
   <p>The <dfn id="application-x-www-form-urlencoded-encoding-algorithm"><code title="">application/x-www-form-urlencoded</code> encoding
   algorithm</dfn> is as follows:</p>
 
-  <ol><li><p>Let <var title="">result</var> be the empty string.</p></li>
+  <ol><!-- the first few steps of this are the same as in the next section --><li><p>Let <var title="">result</var> be the empty string.</p></li>
 
    <li>
 
@@ -1664,7 +1664,8 @@
      with <var title="">charset</var>.</p></li>
 
      <li><p>If the entry's type is "<code title="">file</code>",
-     replace its value with the file's filename only.</p></li>
+     replace its value with the file's filename only.</p></li> <!--
+     this is not present in the next section -->
 
      <li><p>For each character in the entry's name and value that
      cannot be expressed using the selected character encoding,
@@ -1674,9 +1675,11 @@
      U+0039 DIGIT NINE (9) representing the Unicode code point of the
      character in base ten, and finally a U+003B SEMICOLON character
      (;).</p></li><!-- we should say it should be the shortest
-     possible string, no leading zeros. this whole step as asinine,
+     possible string, no leading zeros. this whole step is asinine,
      though, so... -->
 
+     <!-- this is where the similarities with the next section end -->
+
      <li>
 
       <p>For each character in the entry's name and value, apply the
@@ -1756,24 +1759,86 @@
 
   <h5 id="multipart-form-data"><span class="secno">4.10.21.5 </span>Multipart form data</h5>
 
+  <!-- http://hixie.ch/tests/adhoc/html/forms/submission/multipart_form-data/ -->
+
   <p>The <dfn id="multipart-form-data-encoding-algorithm"><code title="">multipart/form-data</code> encoding
-  algorithm</dfn> is to encode the <var title="">form data set</var>
-  using the rules described by RFC2388, <cite>Returning Values from
-  Forms: <code title="">multipart/form-data</code></cite>, and return
-  the resulting byte stream. <a href="references.html#refsRFC2388">[RFC2388]</a></p>
+  algorithm</dfn> is as follows:</p>
 
-  <p>Each entry in the <var title="">form data set</var> is a
-  <i>field</i>, the name of the entry is the <i>field name</i> and the
-  value of the entry is the <i>field value</i>, unless 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>", in which case the <i>field value</i> is the
-  character encoding used by the aforementioned algorithm to encode
-  the value of the field.</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.</p></li>
 
-  <p>The order of parts must be the same as the order of fields in the
-  <var title="">form data set</var>. Multiple entries with the same
-  name must be treated as distinct fields.</p>
+   <li>
 
-  </div><div class="impl">
+    <p>If the <code><a href="forms.html#the-form-element">form</a></code> element has an <code title="attr-form-accept-charset"><a href="forms.html#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="forms.html#the-form-element">form</a></code>'s <code title="attr-form-accept-charset"><a href="forms.html#attr-form-accept-charset">accept-charset</a></code> attribute
+    that is an <a href="infrastructure.html#ascii-compatible-character-encoding">ASCII-compatible character encoding</a>. If
+    none of the encodings are supported, or if none are listed, then
+    let the selected character encoding be UTF-8.</p>
+
+    <p>Otherwise, if the <a href="dom.html#document-s-character-encoding">document's character encoding</a> is
+    an <a href="infrastructure.html#ascii-compatible-character-encoding">ASCII-compatible character encoding</a>, then that is
+    the selected character encoding.</p>
+
+    <p>Otherwise, let the selected character encoding be UTF-8.</p>
+
+   </li>
+
+   <li><p>Let <var title="">charset</var> be the <a href="infrastructure.html#preferred-mime-name">preferred MIME
+   name</a> of the selected character encoding.</p></li>
+
+   <li>
+
+    <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>.</p></li>
+
+     <!-- the step that replaces a file with its name is missing in
+     this version of the algorithm -->
+
+     <li><p>For each character in the entry's name and value that
+     cannot be expressed using the selected character encoding,
+     replace the character by a string consisting of a U+0026
+     AMPERSAND character (&amp;), a U+0023 NUMBER SIGN character (#),
+     one or more characters in the range U+0030 DIGIT ZERO (0) to
+     U+0039 DIGIT NINE (9) representing the Unicode code point of the
+     character in base ten, and finally a U+003B SEMICOLON character
+     (;).</p></li><!-- we should say it should be the shortest
+     possible string, no leading zeros. this whole step is asinine,
+     though, so... -->
+
+     <!-- this is where the similarities with the previous section end -->
+
+    </ol></li>
+
+   <li>
+
+    <p>Encode the (now mutated) <var title="">form data set</var>
+    using the rules described by RFC 2388, <cite>Returning Values from
+    Forms: <code title="">multipart/form-data</code></cite>, and
+    return the resulting byte stream. <a href="references.html#refsRFC2388">[RFC2388]</a></p>
+
+    <p>Each entry in the <var title="">form data set</var> is a
+    <i>field</i>, the name of the entry is the <i>field name</i> and
+    the value of the entry is the <i>field value</i>.</p>
+
+    <p>The order of parts must be the same as the order of fields in
+    the <var title="">form data set</var>. Multiple entries with the
+    same name must be treated as distinct fields.</p>
+
+    <p>The parts of the generated <code title="">multipart/form-data</code> resource that correspond to
+    non-file fields must not have a <code><a href="fetching-resources.html#content-type">Content-Type</a></code> header
+    specified. Their names and values must be encoded using the
+    character encoding selected above (field names in particular do
+    not get converted to a 7-bit safe encoding as suggested in RFC
+    2388).</p>
+
+   </li>
+
+  </ol></div><div class="impl">
 
   <h5 id="plain-text-form-data"><span class="secno">4.10.21.6 </span>Plain text form data</h5>
 

Index: the-input-element.html
===================================================================
RCS file: /sources/public/html5/spec/the-input-element.html,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- the-input-element.html	29 Sep 2010 19:16:55 -0000	1.17
+++ the-input-element.html	12 Oct 2010 00:16:48 -0000	1.18
@@ -1545,8 +1545,9 @@
   the <code title="attr-input-value"><a href="#attr-input-value">value</a></code> content attribute,
   if there is one, or the empty string otherwise, set the <a href="association-of-controls-and-forms.html#concept-fe-checked" title="concept-fe-checked">checkedness</a> of the element to true
   if the element has a <code title="attr-input-checked"><a href="#attr-input-checked">checked</a></code>
-  content attribute and false if it does not, and then invoke the
-  <a href="#value-sanitization-algorithm">value sanitization algorithm</a>, if the <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute's current state
+  content attribute and false if it does not, empty the list of <a href="number-state.html#concept-input-type-file-selected" title="concept-input-type-file-selected">selected files</a>, and
+  then invoke the <a href="#value-sanitization-algorithm">value sanitization algorithm</a>, if the
+  <code title="attr-input-type"><a href="#attr-input-type">type</a></code> attribute's current state
   defines one.</p>
 
   <p>Each <code><a href="#the-input-element">input</a></code> element is either <dfn id="concept-input-mutable" title="concept-input-mutable"><i>mutable</i></dfn> or <dfn id="concept-input-immutable" title="concept-input-immutable"><i>immutable</i></dfn>. Except where

Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1281
retrieving revision 1.1282
diff -u -d -r1.1281 -r1.1282
--- spec.html	11 Oct 2010 22:46:59 -0000	1.1281
+++ spec.html	12 Oct 2010 00:16:48 -0000	1.1282
@@ -320,7 +320,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-11-october-2010">Editor's Draft 11 October 2010</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-12-october-2010">Editor's Draft 12 October 2010</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -341,7 +341,7 @@
     <a href="Overview.html">single page HTML</a>,
     <a href="spec.html">multipage HTML</a>,
     <a href="author/">web developer edition</a>.
-This is revision 1.4477.
+This is revision 1.4479.
    </p> 
      <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
    &#169; 2010 <a href="http://www.w3.org/"><abbr title="World Wide
@@ -426,7 +426,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 11 October 2010 Editor's Draft.
+  This specification is the 12 October 2010 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- relationship to other work (required) --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><!-- required patent boilerplate --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
Received on Tuesday, 12 October 2010 00:16:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 12 October 2010 00:16:56 GMT