Skip to content

Commit

Permalink
% by itself is not a parse error necessarily. Fixes https://www.w3.or…
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Apr 24, 2013
1 parent 27c7c1a commit 9e557de
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 38 deletions.
44 changes: 25 additions & 19 deletions url.html
Expand Up @@ -946,11 +946,12 @@ <h3 id="parsing"><span class="secno">5.2 </span>Parsing</h3>
<p>Otherwise, run these substeps:

<ol>
<li><p>If <a href="#c">c</a> is not the <a href="#eof-code-point">EOF code point</a>
and not a <a href="#url-code-points" title="URL code points">URL code point</a>, or
<a href="#c">c</a> is "<code title="">%</code>" and
<a href="#remaining">remaining</a> does not start with two
<a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.
<li><p>If <a href="#c">c</a> is not the <a href="#eof-code-point">EOF code point</a>, not a
<a href="#url-code-points" title="URL code points">URL code point</a>, and not
"<code title="">%</code>", <a href="#parse-error">parse error</a>.

<li><p>If <a href="#c">c</a> is "<code title="">%</code>" and <a href="#remaining">remaining</a> does
not start with two <a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.

<li><p>If <a href="#c">c</a> is none of
<a href="#eof-code-point">EOF code point</a>, U+0009, U+000A, and U+000D,
Expand Down Expand Up @@ -1127,8 +1128,10 @@ <h3 id="parsing"><span class="secno">5.2 </span>Parsing</h3>
<a href="#parse-error">parse error</a>, continue.

<li><p>If <var title="">code point</var> is not a
<a href="#url-code-points" title="URL code points">URL code point</a>, or
<var title="">code point</var> is "<code title="">%</code>" and
<a href="#url-code-points" title="URL code points">URL code point</a> and not
"<code title="">%</code>", <a href="#parse-error">parse error</a>.

<li><p>If <var title="">code point</var> is "<code title="">%</code>" and
<a href="#remaining">remaining</a> does not start with two
<a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.

Expand Down Expand Up @@ -1392,10 +1395,11 @@ <h3 id="parsing"><span class="secno">5.2 </span>Parsing</h3>

<ol>
<li><p>If <a href="#c">c</a> is not a
<a href="#url-code-points" title="URL code points">URL code point</a>, or
<a href="#c">c</a> is "<code title="">%</code>" and
<a href="#remaining">remaining</a> does not start with two
<a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.
<a href="#url-code-points" title="URL code points">URL code point</a> and not "<code title="">%</code>",
<a href="#parse-error">parse error</a>.

<li><p>If <a href="#c">c</a> is "<code title="">%</code>" and <a href="#remaining">remaining</a> does
not start with two <a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.

<li><p><a href="#utf-8-percent-encode">utf-8 percent encode</a> <a href="#c">c</a> using the
<a href="#default-encode-set">default encode set</a>, and append the result to
Expand Down Expand Up @@ -1457,10 +1461,11 @@ <h3 id="parsing"><span class="secno">5.2 </span>Parsing</h3>

<ol>
<li><p>If <a href="#c">c</a> is not a
<a href="#url-code-points" title="URL code points">URL code point</a>, or
<a href="#c">c</a> is "<code title="">%</code>" and
<a href="#remaining">remaining</a> does not start with two
<a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.
<a href="#url-code-points" title="URL code points">URL code point</a> and not "<code title="">%</code>",
<a href="#parse-error">parse error</a>.

<li><p>If <a href="#c">c</a> is "<code title="">%</code>" and <a href="#remaining">remaining</a> does
not start with two <a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.

<li><p>Append <a href="#c">c</a> to <var title="">buffer</var>.
</ol>
Expand All @@ -1482,10 +1487,11 @@ <h3 id="parsing"><span class="secno">5.2 </span>Parsing</h3>
<dd>
<ol>
<li><p>If <a href="#c">c</a> is not a
<a href="#url-code-points" title="URL code points">URL code point</a>, or
<a href="#c">c</a> is "<code title="">%</code>" and
<a href="#remaining">remaining</a> does not start with two
<a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.
<a href="#url-code-points" title="URL code points">URL code point</a> and not
"<code title="">%</code>", <a href="#parse-error">parse error</a>.

<li><p>If <a href="#c">c</a> is "<code title="">%</code>" and <a href="#remaining">remaining</a> does
not start with two <a href="#ascii-hex-digits">ASCII hex digits</a>, <a href="#parse-error">parse error</a>.

<li><p><a href="#utf-8-percent-encode">utf-8 percent encode</a> <a href="#c">c</a>
using the <a href="#simple-encode-set">simple encode set</a>, and append the result to
Expand Down
44 changes: 25 additions & 19 deletions url.src.html
Expand Up @@ -922,11 +922,12 @@ <h3>Parsing</h3>
<p>Otherwise, run these substeps:

<ol>
<li><p>If <span>c</span> is not the <span>EOF code point</span>
and not a <span title="URL code points">URL code point</span>, or
<span>c</span> is "<code title>%</code>" and
<span>remaining</span> does not start with two
<span>ASCII hex digits</span>, <span>parse error</span>.
<li><p>If <span>c</span> is not the <span>EOF code point</span>, not a
<span title="URL code points">URL code point</span>, and not
"<code title>%</code>", <span>parse error</span>.

<li><p>If <span>c</span> is "<code title>%</code>" and <span>remaining</span> does
not start with two <span>ASCII hex digits</span>, <span>parse error</span>.

<li><p>If <span>c</span> is none of
<span>EOF code point</span>, U+0009, U+000A, and U+000D,
Expand Down Expand Up @@ -1103,8 +1104,10 @@ <h3>Parsing</h3>
<span>parse error</span>, continue.

<li><p>If <var title>code point</var> is not a
<span title="URL code points">URL code point</span>, or
<var title>code point</var> is "<code title>%</code>" and
<span title="URL code points">URL code point</span> and not
"<code title>%</code>", <span>parse error</span>.

<li><p>If <var title>code point</var> is "<code title>%</code>" and
<span>remaining</span> does not start with two
<span>ASCII hex digits</span>, <span>parse error</span>.

Expand Down Expand Up @@ -1368,10 +1371,11 @@ <h3>Parsing</h3>

<ol>
<li><p>If <span>c</span> is not a
<span title="URL code points">URL code point</span>, or
<span>c</span> is "<code title>%</code>" and
<span>remaining</span> does not start with two
<span>ASCII hex digits</span>, <span>parse error</span>.
<span title="URL code points">URL code point</span> and not "<code title>%</code>",
<span>parse error</span>.

<li><p>If <span>c</span> is "<code title>%</code>" and <span>remaining</span> does
not start with two <span>ASCII hex digits</span>, <span>parse error</span>.

<li><p><span>utf-8 percent encode</span> <span>c</span> using the
<span>default encode set</span>, and append the result to
Expand Down Expand Up @@ -1433,10 +1437,11 @@ <h3>Parsing</h3>

<ol>
<li><p>If <span>c</span> is not a
<span title="URL code points">URL code point</span>, or
<span>c</span> is "<code title>%</code>" and
<span>remaining</span> does not start with two
<span>ASCII hex digits</span>, <span>parse error</span>.
<span title="URL code points">URL code point</span> and not "<code title>%</code>",
<span>parse error</span>.

<li><p>If <span>c</span> is "<code title>%</code>" and <span>remaining</span> does
not start with two <span>ASCII hex digits</span>, <span>parse error</span>.

<li><p>Append <span>c</span> to <var title>buffer</var>.
</ol>
Expand All @@ -1458,10 +1463,11 @@ <h3>Parsing</h3>
<dd>
<ol>
<li><p>If <span>c</span> is not a
<span title="URL code points">URL code point</span>, or
<span>c</span> is "<code title>%</code>" and
<span>remaining</span> does not start with two
<span>ASCII hex digits</span>, <span>parse error</span>.
<span title="URL code points">URL code point</span> and not
"<code title>%</code>", <span>parse error</span>.

<li><p>If <span>c</span> is "<code title>%</code>" and <span>remaining</span> does
not start with two <span>ASCII hex digits</span>, <span>parse error</span>.

<li><p><span>utf-8 percent encode</span> <span>c</span>
using the <span>simple encode set</span>, and append the result to
Expand Down

0 comments on commit 9e557de

Please sign in to comment.