Skip to content

Commit

Permalink
[e] (0) Try to clarify what it is that is punycoded in e-mail addresses
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26812
Affected topics: HTML

git-svn-id: https://svn.whatwg.org/webapps@8824 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 29, 2014
1 parent 2a46d9b commit 0072e9a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 22 deletions.
28 changes: 18 additions & 10 deletions complete.html
Expand Up @@ -291,7 +291,7 @@
</style><link rel=stylesheet href=status.css><body onload=init()>
<header id=head class="head with-buttons">
<p><a href=https://whatwg.org/ class=logo><img src=//whatwg.org/images/logo width=101 alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1><h2 id=living-standard-—-last-updated-[date:-01-jan-1901] class="no-num no-toc">Living Standard — Last Updated <span class=pubdate>26 September 2014</span></h2></hgroup>
<hgroup><h1 class=allcaps>HTML</h1><h2 id=living-standard-—-last-updated-[date:-01-jan-1901] class="no-num no-toc">Living Standard — Last Updated <span class=pubdate>29 September 2014</span></h2></hgroup>

<nav>
<div>
Expand Down Expand Up @@ -18514,7 +18514,15 @@ <h4 id=the-img-element>4.8.5 The <dfn><code>img</code></dfn> element</h4>
<dl class=switch><dt>If the descriptor consists of a <a href=#valid-non-negative-integer id=the-img-element:valid-non-negative-integer-2>valid non-negative integer</a>
followed by a U+0077 LATIN SMALL LETTER W character<dd>

<ol><li><p>If <var>width</var> and <var>density</var>
<ol><li>

<p>If the user agent does not support the <code id=the-img-element:attr-img-sizes-4><a href=#attr-img-sizes>sizes</a></code> attribute,
let <var>error</var> be <i>yes</i>.</p>

<p class=note>A conforming user agent will support the <code id=the-img-element:attr-img-sizes-5><a href=#attr-img-sizes>sizes</a></code> attribute.
However, user agents typically implement and ship features in an incremental manner in practice.</p>

<li><p>If <var>width</var> and <var>density</var>
are not both <i>absent</i>,
then let <var>error</var> be <i>yes</i>.<li><p>Apply the <a href=#rules-for-parsing-non-negative-integers id=the-img-element:rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a> to the descriptor.
If the result is zero, let <var>error</var> be <i>yes</i>.
Expand Down Expand Up @@ -18549,15 +18557,15 @@ <h4 id=the-img-element>4.8.5 The <dfn><code>img</code></dfn> element</h4>
If the result is zero, let <var>error</var> be <i>yes</i>.
Otherwise, let <var>future-compat-h</var> be the result.</ol>

<dt>Anything else<dd><p>This is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-4>parse error</a>.</dl>
<dt>Anything else<dd><p>Let <var>error</var> be <i>yes</i>.</dl>

<li><p>If <var>future-compat-h</var> is not <i>absent</i> and <var>width</var> is <i>absent</i>,
let <var>error</var> be <i>yes</i>.<li><p>If <var>error</var> is still <i>no</i>,
then add a new <a href=#image-source id=the-img-element:image-source-7>image source</a> to <var>candidates</var>
whose URL is <var>url</var>,
associated with a width <var>width</var> if not <i>absent</i>
and a pixel density <var>density</var> if not <i>absent</i>.
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-5>parse error</a>.<li><p>Return to the step labeled <i>splitting loop</i>.</ol>
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-4>parse error</a>.<li><p>Return to the step labeled <i>splitting loop</i>.</ol>

<p>When asked to <dfn id=parse-a-sizes-attribute>parse a sizes attribute</dfn> from an element,
<a href=#parse-a-comma-separated-list-of-component-values id=the-img-element:parse-a-comma-separated-list-of-component-values>parse a comma-separated list of component values</a>
Expand All @@ -18570,19 +18578,19 @@ <h4 id=the-img-element>4.8.5 The <dfn><code>img</code></dfn> element</h4>
<ol><li><p>Remove all consecutive <a href=#whitespace-token id=the-img-element:whitespace-token>&lt;whitespace-token></a>s
from the end of <var>unparsed size</var>.
If <var>unparsed size</var> is now empty,
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-6>parse error</a>;
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-5>parse error</a>;
continue to the next iteration of this algorithm.<li><p>If the last <a href=#component-value id=the-img-element:component-value>component value</a> in <var>unparsed size</var>
is a valid non-negative <a href=#source-size-value id=the-img-element:source-size-value-7>&lt;source-size-value></a>,
let <var>size</var> be its value
and remove the <a href=#component-value id=the-img-element:component-value-2>component value</a> from <var>unparsed size</var>.
Any CSS function other than the <code>calc()</code> function is invalid.
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-7>parse error</a>;
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-6>parse error</a>;
continue to the next iteration of this algorithm.<li><p>Remove all consecutive <a href=#whitespace-token id=the-img-element:whitespace-token-2>&lt;whitespace-token></a>s
from the end of <var>unparsed size</var>.
If <var>unparsed size</var> is now empty,
return <var>size</var> and exit this algorithm.
If this was not the last item in <var>unparsed sizes list</var>,
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-8>parse error</a>.<li><p>Parse the remaining <a href=#component-value id=the-img-element:component-value-3>component values</a> in <var>unparsed size</var>
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-7>parse error</a>.<li><p>Parse the remaining <a href=#component-value id=the-img-element:component-value-3>component values</a> in <var>unparsed size</var>
as a <a href=#media-condition id=the-img-element:media-condition-2>&lt;media-condition></a>.
If it does not parse correctly,
or it does parse correctly but the <a href=#media-condition id=the-img-element:media-condition-3>&lt;media-condition></a> evaluates to false,
Expand All @@ -18593,7 +18601,7 @@ <h4 id=the-img-element>4.8.5 The <dfn><code>img</code></dfn> element</h4>

<p>A <dfn id=concept-microsyntax-parse-error>parse error</dfn> for the algorithms above
indicates a non-fatal mismatch between input and requirements.
User agents are encouraged to expose <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-9>parse error</a>s somehow.</p>
User agents are encouraged to expose <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-8>parse error</a>s somehow.</p>

<p class=note>While a <a href=#valid-source-size-list id=the-img-element:valid-source-size-list-2>valid source size list</a> only contains a bare <a href=#source-size-value id=the-img-element:source-size-value-8>&lt;source-size-value></a>
(without an accompanying <a href=#media-condition id=the-img-element:media-condition-4>&lt;media-condition></a>)
Expand Down Expand Up @@ -33683,7 +33691,7 @@ <h6 id="e-mail-state-(type=email)">4.10.5.1.5 <dfn>E-mail</dfn> state (<code>typ
address</a>. The user agent should act in a manner consistent with expecting the user to
provide a single e-mail address. User agents should allow the user to set the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-4">value</a> to the empty string. User agents must not allow users to
insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-5">value</a>. User agents may transform the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-6">value</a> for display and editing; in particular, user agents should
convert punycode in the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-7">value</a> to IDN in the display and
convert punycode in the domain labels of the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-7">value</a> to IDN in the display and
vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface is representing input that
Expand Down Expand Up @@ -33723,7 +33731,7 @@ <h6 id="e-mail-state-(type=email)">4.10.5.1.5 <dfn>E-mail</dfn> state (<code>typ
CARRIAGE RETURN (CR) characters. User agents should allow the user to remove all the addresses
in the element's <a href=#concept-fe-values id="e-mail-state-(type=email):concept-fe-values-3">values</a>. User agents may
transform the <a href=#concept-fe-values id="e-mail-state-(type=email):concept-fe-values-4">values</a> for display and editing; in
particular, user agents should convert punycode in the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-12">value</a> to IDN in the display and vice versa.</p>
particular, user agents should convert punycode in the domain labels of the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-12">value</a> to IDN in the display and vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface describes a situation where
an individual value contains a U+002C COMMA (,) or is representing input that the user agent
Expand Down
28 changes: 18 additions & 10 deletions index
Expand Up @@ -291,7 +291,7 @@
</style><link rel=stylesheet href=status.css><body onload=init()>
<header id=head class="head with-buttons">
<p><a href=https://whatwg.org/ class=logo><img src=//whatwg.org/images/logo width=101 alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1><h2 id=living-standard-—-last-updated-[date:-01-jan-1901] class="no-num no-toc">Living Standard — Last Updated <span class=pubdate>26 September 2014</span></h2></hgroup>
<hgroup><h1 class=allcaps>HTML</h1><h2 id=living-standard-—-last-updated-[date:-01-jan-1901] class="no-num no-toc">Living Standard — Last Updated <span class=pubdate>29 September 2014</span></h2></hgroup>

<nav>
<div>
Expand Down Expand Up @@ -18514,7 +18514,15 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
<dl class=switch><dt>If the descriptor consists of a <a href=#valid-non-negative-integer id=the-img-element:valid-non-negative-integer-2>valid non-negative integer</a>
followed by a U+0077 LATIN SMALL LETTER W character<dd>

<ol><li><p>If <var>width</var> and <var>density</var>
<ol><li>

<p>If the user agent does not support the <code id=the-img-element:attr-img-sizes-4><a href=#attr-img-sizes>sizes</a></code> attribute,
let <var>error</var> be <i>yes</i>.</p>

<p class=note>A conforming user agent will support the <code id=the-img-element:attr-img-sizes-5><a href=#attr-img-sizes>sizes</a></code> attribute.
However, user agents typically implement and ship features in an incremental manner in practice.</p>

<li><p>If <var>width</var> and <var>density</var>
are not both <i>absent</i>,
then let <var>error</var> be <i>yes</i>.<li><p>Apply the <a href=#rules-for-parsing-non-negative-integers id=the-img-element:rules-for-parsing-non-negative-integers>rules for parsing non-negative integers</a> to the descriptor.
If the result is zero, let <var>error</var> be <i>yes</i>.
Expand Down Expand Up @@ -18549,15 +18557,15 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
If the result is zero, let <var>error</var> be <i>yes</i>.
Otherwise, let <var>future-compat-h</var> be the result.</ol>

<dt>Anything else<dd><p>This is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-4>parse error</a>.</dl>
<dt>Anything else<dd><p>Let <var>error</var> be <i>yes</i>.</dl>

<li><p>If <var>future-compat-h</var> is not <i>absent</i> and <var>width</var> is <i>absent</i>,
let <var>error</var> be <i>yes</i>.<li><p>If <var>error</var> is still <i>no</i>,
then add a new <a href=#image-source id=the-img-element:image-source-7>image source</a> to <var>candidates</var>
whose URL is <var>url</var>,
associated with a width <var>width</var> if not <i>absent</i>
and a pixel density <var>density</var> if not <i>absent</i>.
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-5>parse error</a>.<li><p>Return to the step labeled <i>splitting loop</i>.</ol>
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-4>parse error</a>.<li><p>Return to the step labeled <i>splitting loop</i>.</ol>

<p>When asked to <dfn id=parse-a-sizes-attribute>parse a sizes attribute</dfn> from an element,
<a href=#parse-a-comma-separated-list-of-component-values id=the-img-element:parse-a-comma-separated-list-of-component-values>parse a comma-separated list of component values</a>
Expand All @@ -18570,19 +18578,19 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement
<ol><li><p>Remove all consecutive <a href=#whitespace-token id=the-img-element:whitespace-token>&lt;whitespace-token></a>s
from the end of <var>unparsed size</var>.
If <var>unparsed size</var> is now empty,
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-6>parse error</a>;
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-5>parse error</a>;
continue to the next iteration of this algorithm.<li><p>If the last <a href=#component-value id=the-img-element:component-value>component value</a> in <var>unparsed size</var>
is a valid non-negative <a href=#source-size-value id=the-img-element:source-size-value-7>&lt;source-size-value></a>,
let <var>size</var> be its value
and remove the <a href=#component-value id=the-img-element:component-value-2>component value</a> from <var>unparsed size</var>.
Any CSS function other than the <code>calc()</code> function is invalid.
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-7>parse error</a>;
Otherwise, there is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-6>parse error</a>;
continue to the next iteration of this algorithm.<li><p>Remove all consecutive <a href=#whitespace-token id=the-img-element:whitespace-token-2>&lt;whitespace-token></a>s
from the end of <var>unparsed size</var>.
If <var>unparsed size</var> is now empty,
return <var>size</var> and exit this algorithm.
If this was not the last item in <var>unparsed sizes list</var>,
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-8>parse error</a>.<li><p>Parse the remaining <a href=#component-value id=the-img-element:component-value-3>component values</a> in <var>unparsed size</var>
that is a <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-7>parse error</a>.<li><p>Parse the remaining <a href=#component-value id=the-img-element:component-value-3>component values</a> in <var>unparsed size</var>
as a <a href=#media-condition id=the-img-element:media-condition-2>&lt;media-condition></a>.
If it does not parse correctly,
or it does parse correctly but the <a href=#media-condition id=the-img-element:media-condition-3>&lt;media-condition></a> evaluates to false,
Expand All @@ -18593,7 +18601,7 @@ interface <dfn id=htmlimageelement>HTMLImageElement</dfn> : <a href=#htmlelement

<p>A <dfn id=concept-microsyntax-parse-error>parse error</dfn> for the algorithms above
indicates a non-fatal mismatch between input and requirements.
User agents are encouraged to expose <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-9>parse error</a>s somehow.</p>
User agents are encouraged to expose <a href=#concept-microsyntax-parse-error id=the-img-element:concept-microsyntax-parse-error-8>parse error</a>s somehow.</p>

<p class=note>While a <a href=#valid-source-size-list id=the-img-element:valid-source-size-list-2>valid source size list</a> only contains a bare <a href=#source-size-value id=the-img-element:source-size-value-8>&lt;source-size-value></a>
(without an accompanying <a href=#media-condition id=the-img-element:media-condition-4>&lt;media-condition></a>)
Expand Down Expand Up @@ -33683,7 +33691,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement i
address</a>. The user agent should act in a manner consistent with expecting the user to
provide a single e-mail address. User agents should allow the user to set the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-4">value</a> to the empty string. User agents must not allow users to
insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-5">value</a>. User agents may transform the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-6">value</a> for display and editing; in particular, user agents should
convert punycode in the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-7">value</a> to IDN in the display and
convert punycode in the domain labels of the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-7">value</a> to IDN in the display and
vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface is representing input that
Expand Down Expand Up @@ -33723,7 +33731,7 @@ interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href=#htmlelement i
CARRIAGE RETURN (CR) characters. User agents should allow the user to remove all the addresses
in the element's <a href=#concept-fe-values id="e-mail-state-(type=email):concept-fe-values-3">values</a>. User agents may
transform the <a href=#concept-fe-values id="e-mail-state-(type=email):concept-fe-values-4">values</a> for display and editing; in
particular, user agents should convert punycode in the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-12">value</a> to IDN in the display and vice versa.</p>
particular, user agents should convert punycode in the domain labels of the <a href=#concept-fe-value id="e-mail-state-(type=email):concept-fe-value-12">value</a> to IDN in the display and vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface describes a situation where
an individual value contains a U+002C COMMA (,) or is representing input that the user agent
Expand Down
4 changes: 2 additions & 2 deletions source
Expand Up @@ -43529,7 +43529,7 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
insert U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR) characters into the <span
data-x="concept-fe-value">value</span>. User agents may transform the <span
data-x="concept-fe-value">value</span> for display and editing; in particular, user agents should
convert punycode in the <span data-x="concept-fe-value">value</span> to IDN in the display and
convert punycode in the domain labels of the <span data-x="concept-fe-value">value</span> to IDN in the display and
vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface is representing input that
Expand Down Expand Up @@ -43575,7 +43575,7 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
CARRIAGE RETURN (CR) characters. User agents should allow the user to remove all the addresses
in the element's <span data-x="concept-fe-values">values</span>. User agents may
transform the <span data-x="concept-fe-values">values</span> for display and editing; in
particular, user agents should convert punycode in the <span
particular, user agents should convert punycode in the domain labels of the <span
data-x="concept-fe-value">value</span> to IDN in the display and vice versa.</p>

<p><strong>Constraint validation</strong>: While the user interface describes a situation where
Expand Down

0 comments on commit 0072e9a

Please sign in to comment.