Skip to content

Commit

Permalink
[e] (0) Update the syntax error example in light of changes to the co…
Browse files Browse the repository at this point in the history
…nformance rules.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=10743

git-svn-id: http://svn.whatwg.org/webapps@5599 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 11, 2010
1 parent f97c1c0 commit 1f5f573
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions complete.html
Expand Up @@ -2117,15 +2117,15 @@ <h4 id=syntax-errors><span class=secno>1.10.2 </span>Syntax errors</h4>
are changed to a string that <em>does</em> form a named character
reference, they will be interpreted as that character instead.</p>

<p>In this fragment, the attribute's value is "<code title="">?hello=1&amp;world=2</code>":</p>
<p>In this fragment, the attribute's value is "<code title="">?bill&amp;ted</code>":</p>

<pre class=bad>&lt;a href="?hello=1&amp;world=2"&gt;Demo&lt;/a&gt;</pre>
<pre class=bad>&lt;a href="?bill&amp;ted"&gt;Bill and Ted&lt;/a&gt;</pre>

<p>In the following fragment, however, the attribute's value is
actually "<code title="">?original=1&copy;=2</code>",
<em>not</em> the intended "<code title="">?original=1&amp;copy=2</code>":</p>
actually "<code title="">?art&copy;</code>",
<em>not</em> the intended "<code title="">?art&amp;copy</code>":</p>

<pre class=bad>&lt;a href="?original=1&amp;copy=2"&gt;Compare&lt;/a&gt;</pre>
<pre class=bad>&lt;a href="?art&amp;copy"&gt;Art and Copy&lt;/a&gt;</pre>

<p>To avoid this problem, all named character references are
required to end with a semicolon, and uses of named character
Expand All @@ -2134,8 +2134,8 @@ <h4 id=syntax-errors><span class=secno>1.10.2 </span>Syntax errors</h4>
<p>Thus, the correct way to express the above cases is as
follows:</p>

<pre>&lt;a href="?hello=1&amp;world=2"&gt;Demo&lt;/a&gt; &lt;!-- &amp;world is ok, since it's not a named character reference --&gt;</pre>
<pre>&lt;a href="?original=1&amp;amp;copy=2"&gt;Compare&lt;/a&gt; &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --&gt;</pre>
<pre>&lt;a href="?bill&amp;ted"&gt;Bill and Ted&lt;/a&gt; &lt;!-- &amp;ted is ok, since it's not a named character reference --&gt;</pre>
<pre>&lt;a href="?art&amp;amp;copy"&gt;Art and Copy&lt;/a&gt; &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --&gt;</pre>

</div>

Expand Down
14 changes: 7 additions & 7 deletions index
Expand Up @@ -2094,15 +2094,15 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
are changed to a string that <em>does</em> form a named character
reference, they will be interpreted as that character instead.</p>

<p>In this fragment, the attribute's value is "<code title="">?hello=1&amp;world=2</code>":</p>
<p>In this fragment, the attribute's value is "<code title="">?bill&amp;ted</code>":</p>

<pre class=bad>&lt;a href="?hello=1&amp;world=2"&gt;Demo&lt;/a&gt;</pre>
<pre class=bad>&lt;a href="?bill&amp;ted"&gt;Bill and Ted&lt;/a&gt;</pre>

<p>In the following fragment, however, the attribute's value is
actually "<code title="">?original=1&copy;=2</code>",
<em>not</em> the intended "<code title="">?original=1&amp;copy=2</code>":</p>
actually "<code title="">?art&copy;</code>",
<em>not</em> the intended "<code title="">?art&amp;copy</code>":</p>

<pre class=bad>&lt;a href="?original=1&amp;copy=2"&gt;Compare&lt;/a&gt;</pre>
<pre class=bad>&lt;a href="?art&amp;copy"&gt;Art and Copy&lt;/a&gt;</pre>

<p>To avoid this problem, all named character references are
required to end with a semicolon, and uses of named character
Expand All @@ -2111,8 +2111,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>Thus, the correct way to express the above cases is as
follows:</p>

<pre>&lt;a href="?hello=1&amp;world=2"&gt;Demo&lt;/a&gt; &lt;!-- &amp;world is ok, since it's not a named character reference --&gt;</pre>
<pre>&lt;a href="?original=1&amp;amp;copy=2"&gt;Compare&lt;/a&gt; &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --&gt;</pre>
<pre>&lt;a href="?bill&amp;ted"&gt;Bill and Ted&lt;/a&gt; &lt;!-- &amp;ted is ok, since it's not a named character reference --&gt;</pre>
<pre>&lt;a href="?art&amp;amp;copy"&gt;Art and Copy&lt;/a&gt; &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --&gt;</pre>

</div>

Expand Down
14 changes: 7 additions & 7 deletions source
Expand Up @@ -984,16 +984,16 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
reference, they will be interpreted as that character instead.</p>

<p>In this fragment, the attribute's value is "<code
title="">?hello=1&amp;world=2</code>":</p>
title="">?bill&amp;ted</code>":</p>

<pre class="bad">&lt;a href="?hello=1&amp;world=2">Demo&lt;/a></pre>
<pre class="bad">&lt;a href="?bill&amp;ted">Bill and Ted&lt;/a></pre>

<p>In the following fragment, however, the attribute's value is
actually "<code title="">?original=1&copy;=2</code>",
actually "<code title="">?art&copy;</code>",
<em>not</em> the intended "<code
title="">?original=1&amp;copy=2</code>":</p>
title="">?art&amp;copy</code>":</p>

<pre class="bad">&lt;a href="?original=1&amp;copy=2">Compare&lt;/a></pre>
<pre class="bad">&lt;a href="?art&amp;copy">Art and Copy&lt;/a></pre>

<p>To avoid this problem, all named character references are
required to end with a semicolon, and uses of named character
Expand All @@ -1002,8 +1002,8 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d
<p>Thus, the correct way to express the above cases is as
follows:</p>

<pre>&lt;a href="?hello=1&amp;world=2">Demo&lt;/a> &lt;!-- &amp;world is ok, since it's not a named character reference --></pre>
<pre>&lt;a href="?original=1&amp;amp;copy=2">Compare&lt;/a> &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --></pre>
<pre>&lt;a href="?bill&amp;ted">Bill and Ted&lt;/a> &lt;!-- &amp;ted is ok, since it's not a named character reference --></pre>
<pre>&lt;a href="?art&amp;amp;copy">Art and Copy&lt;/a> &lt;!-- the &amp; has to be escaped, since &amp;copy <em>is</em> a named character reference --></pre>

</div>

Expand Down

0 comments on commit 1f5f573

Please sign in to comment.