Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 65 additions & 78 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,6 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#concept-host-equals">Host equals</dfn>
<li><dfn data-noexport="" data-x="serialise an integer" data-x-href="https://url.spec.whatwg.org/#serialize-an-integer">serialise an integer</dfn>
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#default-encode-set">Default encode set</dfn>
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#percent-encode">Percent encode</dfn>
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#utf-8-percent-encode">UTF-8 percent encode</dfn>
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#percent-decode">Percent decode</dfn>
<li><dfn data-noexport="" data-x-href="https://url.spec.whatwg.org/#set-the-username">set the username</dfn>
Expand Down Expand Up @@ -54448,8 +54447,6 @@ fur
to the <var>submitter</var> element's <span>node document</span>. If this fails, abort these
steps.</p></li>

<li><p>Let <var>action</var> be the <span>resulting URL string</span>.</p></li>

<li><p>Let <var>parsed action</var> be the <span>resulting URL record</span>.</p></li>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this just an unused variable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The combination of e2d80d9 and 69ea9df landing made it redundant, yes.

<li><p>Let <var>scheme</var> be the <span data-x="concept-url-scheme">scheme</span> of
Expand Down Expand Up @@ -54575,9 +54572,9 @@ fur
<dt><dfn data-x="submit-mutate-action">Mutate action URL</dfn>
<dd>

<p>Let <var>query</var> be the result of running the <span><code
data-x="">application/x-www-form-urlencoded</code> encoding algorithm</span> with <var>form
data set</var> and <var>encoding</var>, interpreted as a US-ASCII string.</p>
<p>Let <var>query</var> be the result of running the
<span><code>application/x-www-form-urlencoded</code> serializer</span> with <var>form data
set</var> and <var>encoding</var>.</p>

<p>Set <var>parsed action</var>'s <span data-x="concept-url-query">query</span>
component to <var>query</var>.</p>
Expand All @@ -54588,41 +54585,55 @@ fur

<dt><dfn data-x="submit-body">Submit as entity body</dfn>
<dd>
<p>Switch on <var>enctype</var>:

<p>Let <var>entity body</var> be the result of running the <span>appropriate form encoding
algorithm</span> with <var>form data set</var> and <var>encoding</var>.</p>
<dl class="switch">
<dt><code data-x="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code></dt>

<p>Let <var>MIME type</var> be determined as follows:</p>
<dd>
<p>Let <var>body</var> be the result of running the
<span><code>application/x-www-form-urlencoded</code> serializer</span> with <var>form
data set</var> and <var>encoding</var>.</p>

<dl>
<p>Set <var>body</var> to the result of <span data-x="UTF-8 encode">encoding</span>
<var>body</var>.</p>

<dt>If <var>enctype</var> is <code
data-x="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code></dt>
<p>Let <var>MIME type</var> be "<code>application/x-www-form-urlencoded</code>".</p>
</dd>

<dd>Let <var>MIME type</var> be "<code>application/x-www-form-urlencoded</code>".</dd>
<dt><code data-x="attr-fs-enctype-formdata">multipart/form-data</code></dt>

<dt>If <var>enctype</var> is <code
data-x="attr-fs-enctype-formdata">multipart/form-data</code></dt>
<dd>
<p>Let <var>body</var> be the result of running the <span><code
data-x="">multipart/form-data</code> encoding algorithm</span> with <var>form data set</var>
and <var>encoding</var>.</p>

<p>Let <var>MIME type</var> be the concatenation of the string "<code
data-x="">multipart/form-data;</code>", a U+0020 SPACE character, the string "<code
data-x="">boundary=</code>", and the <span><code data-x="">multipart/form-data</code>
boundary string</span> generated by the <span><code data-x="">multipart/form-data</code>
encoding algorithm</span>.</p>
</dd>

<dd>Let <var>MIME type</var> be the concatenation of the string "<code
data-x="">multipart/form-data;</code>", a U+0020 SPACE character, the string "<code
data-x="">boundary=</code>", and the <span><code data-x="">multipart/form-data</code> boundary
string</span> generated by the <span><code data-x="">multipart/form-data</code> encoding
algorithm</span>.</dd>
<dt><code data-x="attr-fs-enctype-text">text/plain</code></dt>

<dt>If <var>enctype</var> is <code
data-x="attr-fs-enctype-text">text/plain</code></dt>
<dd>
<p>Let <var>body</var> be the result of running the <span><code data-x="">text/plain</code>
encoding algorithm</span> with <var>form data set</var> and <var>encoding</var>.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace "," with " and"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ta, fixed.


<dd>Let <var>MIME type</var> be "<code data-x="">text/plain</code>".</dd>
<p>Set <var>body</var> to the result of <span data-x="encode">encoding</span>
<var>body</var> using <var>encoding</var>.</p>

<p>Let <var>MIME type</var> be "<code data-x="">text/plain</code>".</p>
</dd>
</dl>

<p><span>Plan to navigate</span> to a new <span data-x="concept-request">request</span> whose
<span data-x="concept-request-url">url</span> is <var>parsed action</var>, <span
data-x="concept-request-method">method</span> is <var>method</var>, <span
data-x="concept-request-header-list">header list</span> consists of `<code
data-x="">Content-Type</code>`/<var>MIME type</var>, and <span
data-x="concept-request-body">body</span> is <var>entity body</var>.</p>
data-x="concept-request-body">body</span> is <var>body</var>.</p>

</dd>

Expand All @@ -54637,9 +54648,9 @@ fur

<dt><dfn data-x="submit-mailto-headers">Mail with headers</dfn>
<dd>
<p>Let <var>headers</var> be the result of running the <span><code
data-x="">application/x-www-form-urlencoded</code> encoding algorithm</span> with <var>form
data set</var> and <var>encoding</var>, interpreted as a US-ASCII string.</p>
<p>Let <var>headers</var> be the result of running the
<span><code>application/x-www-form-urlencoded</code> serializer</span> with <var>form data
set</var> and <var>encoding</var>.</p>

<p>Replace occurrences of U+002B PLUS SIGN characters (+) in <var>headers</var> with
the string "<code data-x="">%20</code>".</p>
Expand All @@ -54652,11 +54663,27 @@ fur

<dt><dfn data-x="submit-mailto-body">Mail as body</dfn>
<dd>
<p>Let <var>body</var> be the resulting of running the <span>appropriate form encoding
algorithm</span> with <var>form data set</var> and <var>encoding</var>, and then <span
data-x="percent encode">percent encoding</span> all the bytes in the resulting byte string
that, when interpreted as US-ASCII, are not characters in the URL <span>default encode
set</span>. <ref spec=URL></p>
<p>Switch on <var>enctype</var>:

<dl class="switch">
<dt><code data-x="attr-fs-enctype-text">text/plain</code></dt>

<dd>
<p>Let <var>body</var> be the result of running the <span><code
data-x="">text/plain</code> encoding algorithm</span> with <var>form data set</var> and
<var>encoding</var>.</p>

<p>Set <var>body</var> to the result of concatonating the result of <span data-x="UTF-8
percent encode">UTF-8 percent encoding</span> each code point in <var>body</var>, using the
<span>default encode set</span>. <ref spec=URL></p>
</dd>

<dt>Otherwise</dt>

<dd><p>Let <var>body</var> be the result of running the
<span><code>application/x-www-form-urlencoded</code> serializer</span> with <var>form data
set</var> and <var>encoding</var>.</p></dd>
</dl>

<p>If <var>parsed action</var>'s <span data-x="concept-url-query">query</span> is null, then
set it to the empty string.
Expand All @@ -54667,8 +54694,8 @@ fur
<p>Append "<code data-x="">body=</code>" to <var>parsed action</var>'s <span
data-x="concept-url-query">query</span>.</p>

<p>Append <var>body</var>, interpreted as a US-ASCII string, to <var>parsed action</var>'s
<span data-x="concept-url-query">query</span>.</p>
<p>Append <var>body</var> to <var>parsed action</var>'s <span
data-x="concept-url-query">query</span>.</p>

<p><span>Plan to navigate</span> to <var>parsed action</var>.</p>
</dd>
Expand Down Expand Up @@ -54702,28 +54729,6 @@ fur

</dl>

<p>The <dfn>appropriate form encoding algorithm</dfn> is
determined as follows:</p>

<dl>

<dt>If <var>enctype</var> is <code
data-x="attr-fs-enctype-urlencoded">application/x-www-form-urlencoded</code></dt>

<dd>Use the <span><code data-x="">application/x-www-form-urlencoded</code> encoding
algorithm</span>.</dd>

<dt>If <var>enctype</var> is <code
data-x="attr-fs-enctype-formdata">multipart/form-data</code></dt>

<dd>Use the <span><code>multipart/form-data</code> encoding algorithm</span>.</dd>

<dt>If <var>enctype</var> is <code data-x="attr-fs-enctype-text">text/plain</code></dt>

<dd>Use the <span><code data-x="">text/plain</code> encoding algorithm</span>.</dd>

</dl>

</li>

</ol>
Expand Down Expand Up @@ -54991,26 +54996,9 @@ fur

<h5>URL-encoded form data</h5>

<p>See the WHATWG URL standard for details on <code>application/x-www-form-urlencoded</code>. <ref
spec=URL></p>

<div w-nodev>

<p id="application-x-www-form-urlencoded-encoding-algorithm">The <dfn><code
data-x="">application/x-www-form-urlencoded</code> encoding algorithm</dfn>, given a <var>form
data set</var> and <var>encoding</var>, is as follows:</p>

<ol>

<li><p>Let <var>serialized</var> be the result of running the
<span><code>application/x-www-form-urlencoded</code> serializer</span> given <var>form data
set</var> and <var>encoding</var>.</p></li>

<li><p>Return the result of <span data-x="utf-8 encode">encoding</span>
<var>serialized</var>.</p></li>
</ol>

</div>
<p id="application-x-www-form-urlencoded-encoding-algorithm"><span
id="application/x-www-form-urlencoded-encoding-algorithm"></span>See the WHATWG URL standard for
details on <code>application/x-www-form-urlencoded</code>. <ref spec=URL></p>


<h5>Multipart form data</h5>
Expand Down Expand Up @@ -55132,8 +55120,7 @@ fur

</li>

<li><p>Return the result of <span data-x="encode">encoding</span> <var>result</var> using
<var>encoding</var>.</p></li>
<li><p>Return <var>result</var>.</p></li>

</ol>

Expand Down