Skip to content

Commit

Permalink
[] (0) WF2: Submitting to data: URLs.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2168 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 12, 2008
1 parent d07e35b commit 39fa161
Show file tree
Hide file tree
Showing 2 changed files with 168 additions and 6 deletions.
81 changes: 78 additions & 3 deletions index
Expand Up @@ -27820,7 +27820,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
<dt><dfn id=submit title=submit-body>Submit as entity body</dfn>

<dd>
<p>Let <var title="">entity body</var> be the resulting encoding the
<p>Let <var title="">entity body</var> be the result of encoding the
<var title="">form data set</var> using the <a
href="#appropriate">appropriate form encoding algorithm</a>.</p>

Expand Down Expand Up @@ -27862,12 +27862,87 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
<dt><dfn id=post-to title=submit-data-post>Post to data:</dfn>

<dd>
<p class=big-issue>...
<p>Let <var title="">data</var> be the result of encoding the <var
title="">form data set</var> using the <a
href="#appropriate">appropriate form encoding algorithm</a>.</p>

<p>If <var title="">action</var> contains the string "<code
title="">%%%%</code>" (four U+0025 PERCENT SIGN characters), then
%-escape all characters in <var title="">data</var> that do not match
the <code title="">unreserved</code> production in the URI Generic
Syntax, and then further %-escape all the U+0025 PERCENT SIGN
characters in the resulting string, and replace the first occurance of
"<code title="">%%%%</code>" in <var title="">action</var> with the
resulting double-escaped string. <a href="#refsRFC3986">[RFC3986]</a></p>

<p>Otherwise, if <var title="">action</var> contains the string "<code
title="">%%</code>" (two U+0025 PERCENT SIGN characters in a row, but
not four), then %-escape all characters in <var title="">data</var>
that do not match the <code title="">unreserved</code> production in
the URI Generic Syntax, and replace the first occurance of "<code
title="">%%</code>" in <var title="">action</var> with the resulting
escaped string. <a href="#refsRFC3986">[RFC3986]</a></p>

<p>Let <var title="">target browsing context</var> be <a
href="#the-form0">the form submission target browsing context</a>.</p>

<p><a href="#navigate">Navigate</a> <var title="">target browsing
context</var> to the potentially modified <var title="">action</var>.
If <var title="">target browsing context</var> was newly created for
this purpose by the steps above, then it must be navigated with <a
href="#replacement">replacement enabled</a>.</p>

<dt><dfn id=put-to title=submit-data-put>Put to data:</dfn>

<dd>
<p class=big-issue>...
<p>Let <var title="">data</var> be the result of encoding the <var
title="">form data set</var> using the <a
href="#appropriate">appropriate form encoding algorithm</a>.</p>

<p>Let <var title="">MIME type</var> be determined as follows:</p>

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

<dd>Let <var title="">MIME type</var> be "<code
title="">application/x-www-form-urlencoded</code>".

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

<dd>Let <var title="">MIME type</var> be "<code
title="">multipart/form-data</code>".

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

<dd>Let <var title="">MIME type</var> be "<code
title="">text/plain</code>".
</dl>

<p>Let <var title="">destination</var> be the result of concatenating
the following:</p>

<ol class=brief>
<li>The string "<code title="">data:</code>".

<li>The value of <var title="">MIME type</var>.

<li>The string "<code title="">;base64,</code>".

<li>A base-64 encoded representation of <var title="">data</var>. <a
href="#refsRFC2045">[RFC2045]</a>
</ol>

<p>Let <var title="">target browsing context</var> be <a
href="#the-form0">the form submission target browsing context</a>.</p>

<p><a href="#navigate">Navigate</a> <var title="">target browsing
context</var> to <var title="">destination</var>. If <var
title="">target browsing context</var> was newly created for this
purpose by the steps above, then it must be navigated with <a
href="#replacement">replacement enabled</a>.</p>

<dt><dfn id=mail-with title=submit-mailto-headers>Mail with
headers</dfn>
Expand Down
93 changes: 90 additions & 3 deletions source
Expand Up @@ -24940,7 +24940,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
<dt><dfn title="submit-body">Submit as entity body</dfn>
<dd>

<p>Let <var title="">entity body</var> be the resulting encoding
<p>Let <var title="">entity body</var> be the result of encoding
the <var title="">form data set</var> using the
<span>appropriate form encoding algorithm</span>.</p>

Expand Down Expand Up @@ -24986,10 +24986,97 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
</dd>

<dt><dfn title="submit-data-post">Post to data:</dfn>
<dd><p class="big-issue">...</p></dd>
<dd>

<p>Let <var title="">data</var> be the result of encoding the
<var title="">form data set</var> using the <span>appropriate
form encoding algorithm</span>.</p>

<p>If <var title="">action</var> contains the string "<code
title="">%%%%</code>" (four U+0025 PERCENT SIGN characters),
then %-escape all characters in <var title="">data</var> that do
not match the <code title="">unreserved</code> production in the
URI Generic Syntax, and then further %-escape all the U+0025
PERCENT SIGN characters in the resulting string, and replace the
first occurance of "<code title="">%%%%</code>" in <var
title="">action</var> with the resulting double-escaped
string. <a href="#refsRFC3986">[RFC3986]</a></p>

<p>Otherwise, if <var title="">action</var> contains the string
"<code title="">%%</code>" (two U+0025 PERCENT SIGN characters
in a row, but not four), then %-escape all characters in <var
title="">data</var> that do not match the <code
title="">unreserved</code> production in the URI Generic Syntax,
and replace the first occurance of "<code title="">%%</code>" in
<var title="">action</var> with the resulting escaped string. <a
href="#refsRFC3986">[RFC3986]</a></p>

<p>Let <var title="">target browsing context</var> be <span>the
form submission target browsing context</span>.</p>

<p><span>Navigate</span> <var title="">target browsing
context</var> to the potentially modified <var
title="">action</var>. If <var title="">target browsing
context</var> was newly created for this purpose by the steps
above, then it must be navigated with <span>replacement
enabled</span>.</p>

</dd>

<dt><dfn title="submit-data-put">Put to data:</dfn>
<dd><p class="big-issue">...</p></dd>
<dd>

<p>Let <var title="">data</var> be the result of encoding the
<var title="">form data set</var> using the <span>appropriate
form encoding algorithm</span>.</p>

<p>Let <var title="">MIME type</var> be determined as
follows:</p>

<dl>

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

<dd>Let <var title="">MIME type</var> be "<code
title="">application/x-www-form-urlencoded</code>".</dd>

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

<dd>Let <var title="">MIME type</var> be "<code
title="">multipart/form-data</code>".</dd>

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

<dd>Let <var title="">MIME type</var> be "<code title="">text/plain</code>".</dd>

</dl>

<p>Let <var title="">destination</var> be the result of
concatenating the following:</p>

<ol class="brief">

<li>The string "<code title="">data:</code>".</li>

<li>The value of <var title="">MIME type</var>.</li>

<li>The string "<code title="">;base64,</code>".</li>

<li>A base-64 encoded representation of <var
title="">data</var>. <a href="#refsRFC2045">[RFC2045]</a></li>

</ol>

<p>Let <var title="">target browsing context</var> be <span>the
form submission target browsing context</span>.</p>

<p><span>Navigate</span> <var title="">target browsing
context</var> to <var title="">destination</var>. If <var
title="">target browsing context</var> was newly created for
this purpose by the steps above, then it must be navigated with
<span>replacement enabled</span>.</p>

</dd>

<dt><dfn title="submit-mailto-headers">Mail with headers</dfn>
<dd><p class="big-issue">...</p></dd>
Expand Down

0 comments on commit 39fa161

Please sign in to comment.