- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 21 Jan 2011 02:36:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv10700
Modified Files:
Overview.html
Log Message:
Clarify the 'escaping a string' algorithm by expanding it into a full explanation. (whatwg r5797)
Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4657
retrieving revision 1.4658
diff -u -d -r1.4657 -r1.4658
--- Overview.html 21 Jan 2011 01:47:50 -0000 1.4657
+++ Overview.html 21 Jan 2011 02:36:10 -0000 1.4658
@@ -62200,15 +62200,7 @@
<li><p>The result of the algorithm is the string <var title="">s</var>.</li>
- </ol><p><dfn id="escapingString">Escaping a string</dfn> (for the
- purposes of the algorithm above) consists of replacing any
- occurrences of the "<code title="">&</code>" character by the
- string "<code title="">&amp;</code>", any occurrences of the
- U+00A0 NO-BREAK SPACE character by the string "<code title="">&nbsp;</code>", and, if the algorithm was invoked in
- the <i>attribute mode</i>, any occurrences of the "<code title="">"</code>" character by the string "<code title="">&quot;</code>", or if it was not, any occurrences of
- the "<code title=""><</code>" character by the string "<code title="">&lt;</code>", any occurrences of the "<code title="">></code>" character by the string "<code title="">&gt;</code>".</p>
-
- <p class="note">Entity reference nodes are <a href="#entity-references">assumed to be expanded</a> by the user
+ </ol><p class="note">Entity reference nodes are <a href="#entity-references">assumed to be expanded</a> by the user
agent, and are therefore not covered in the algorithm above.</p>
<p class="note">It is possible that the output of this algorithm, if
@@ -62228,8 +62220,24 @@
<a href="#syntax-start-tag" title="syntax-start-tag">start tag</a> would imply the end
tag for the <code><a href="#the-p-element">p</a></code>).</p>
+ <p><dfn id="escapingString">Escaping a string</dfn> (for the
+ purposes of the algorithm above) consists of running the following
+ steps:</p>
- <h3 id="parsing-html-fragments"><span class="secno">8.4 </span>Parsing HTML fragments</h3>
+ <ol><li><p>Replace any occurrence of the "<code title="">&</code>"
+ character by the string "<code title="">&amp;</code>".</li>
+
+ <li><p>Replace any occurrences of the U+00A0 NO-BREAK SPACE
+ character by the string "<code title="">&nbsp;</code>".</li>
+
+ <li><p>If the algorithm was invoked in the <i>attribute mode</i>,
+ replace any occurrences of the "<code title="">"</code>"
+ character by the string "<code title="">&quot;</code>".</li>
+
+ <li><p>If the algorithm was <em>not</em> invoked in the
+ <i>attribute mode</i>, replace any occurrences of the "<code title=""><</code>" character by the string "<code title="">&lt;</code>", and any occurrences of the "<code title="">></code>" character by the string "<code title="">&gt;</code>".</li>
+
+ </ol><h3 id="parsing-html-fragments"><span class="secno">8.4 </span>Parsing HTML fragments</h3>
<p>The following steps form the <dfn id="html-fragment-parsing-algorithm">HTML fragment parsing
algorithm</dfn>. The algorithm optionally takes as input an
Received on Friday, 21 January 2011 02:36:17 UTC