W3C home > Mailing lists > Public > public-html-diffs@w3.org > October 2008

spec/Overview.html 1.1549 2377 Clarify that processing of action='' (em

From: poot <cvsmail@w3.org>
Date: Wed, 29 Oct 2008 09:59:42 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20081029005942.635EE2BBE7@toro.w3.mag.keio.ac.jp>

Clarify that processing of action='' (empty) is wrong per RFC3986.
(credit: tb) (whatwg r2377)

Constructing the form data set. For each element field in controls, in tree order, run the following substeps: If any of the following conditions are met, then skip these substeps for this element: The field element has a datalist element ancestor. The field element is disabled. The field element is a button but it is not submitter. The field element is an input element whose type attribute is in the Checkbox state and whose checkedness is false. The field element is an input element whose type attribute is in the Radio Button state and whose checkedness is false. The field element is an input element whose type attribute is in the File Upload state but the control does not have any files selected. Otherwise, process field as follows: Let type be the value of the type DOM attribute of field. If the field element is an input element whose type attribute is in the Image Button state, then run these further nested substeps: If the field element has an name attribute specified and value is not the empty string,let name be that value followed by a single U+002E FULL STOP (.) character. Otherwise, let name be the empty string. Let namex be the string consisting of the concatenation of name and a single U+0078 LATIN SMALL LETTER X (x) character. Let namey be the string consisting of the concatenation of name and a single U+0079 LATIN SMALL LETTER Y (y) character. The field element is submitter, and before this algorithm was invoked the user indicated a coordinate. Let x be the x-component of the coordindate selected by the user, and let y be the y-component of the coordinate selected by the user. Append an entry in the form data set with the name namex, the value x, and the type type. Append an entry in the form data set with the name namey and the value y, and the type type. Skip the remaining substeps for this element: if there are any more elements in controls, return to the top of the constructing the form data set step, otherwise, jump to the next step in the overall form submission algorithm. If the field elemnt does not have a name attribute specified, or its name attribute's value is the empty string, skip these substeps for this element: if there are any more elements in controls, return to the top of the constructing the form data set step, otherwise, jump to the next step in the overall form submission algorithm. Let name be the value of the field element's name attribute. If the field element is a select element, then for each option element in the select element whose selectedness is true, append an entry in the form data set with the name as the name, the value of the option element as the value, and type as the type. Otherwise, if the field element is an input element whose type attribute is in the Checkbox state or the Radio Button state, then then run these further nested substeps: If the field element has a value attribute specified, then let value be the value of that attribute; otherwise, let value be the string "on". Append an entry in the form data set with name as the name, value as the value, ad type as the type. Otherwise, if the field element is an input element whose type attribute is in the File Upload state, then for each file selected in the input element, append an entry in the form data set with the name as the name, the file (consisting of the name, the type, and the body) as the value, and type as the type. Otherwise, append an entry in the form data set with name as the name, the value of the field element as the value, and type as the type.
http://people.w3.org/mike/diffs/html5/spec/Overview.1.1549.html#constructing-form-data-set

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.1548&r2=1.1549&f=h
http://html5.org/tools/web-apps-tracker?from=2376&to=2377

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1548
retrieving revision 1.1549
diff -u -d -r1.1548 -r1.1549
--- Overview.html	29 Oct 2008 00:44:27 -0000	1.1548
+++ Overview.html	29 Oct 2008 00:56:56 -0000	1.1549
@@ -22537,11 +22537,22 @@
 
    <li><p>Let <var title="">action</var> be the <var title="">submitter</var> element's <a href=#concept-fs-action title=concept-fs-action>action</a>.</li>
 
-   <li><p>If <var title="">action</var> is the empty string, let <var title="">action</var> be <span>the document's address</span><!--
-   XXXDOCURL -->.</p> <!-- Don't ask me why. But that's what IE
-   does. It even treats action="" differently from action=" " or
-   action="#" (the latter two resolve to the base URL, the first one
-   resolves to the doc URL) -->
+   <li>
+
+    <p>If <var title="">action</var> is the empty string, let <var title="">action</var> be <span>the document's address</span><!--
+    XXXDOCURL -->.</p>
+
+    <p class=note>This step is a willful violation of RFC 3986. <a href=#references>[RFC3986]</a></p>
+
+    <!-- Don't ask me why. But that's what IE does. It even treats
+    action="" differently from action=" " or action="#" (the latter
+    two resolve to the base URL, the first one resolves to the doc
+    URL). And other browsers concur. It is even required, see e.g.
+      http://bugs.webkit.org/show_bug.cgi?id=7763
+      https://bugzilla.mozilla.org/show_bug.cgi?id=297761
+    -->
+
+   </li>
 
    <li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
    <a href=#url>URL</a> <var title="">action</var>. If this fails, abort
Received on Wednesday, 29 October 2008 01:00:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 06:13:56 GMT