[html5] r929 - /

whatwg at whatwg.org whatwg at whatwg.org
Tue Jun 19 16:14:09 PDT 2007


Author: ianh
Date: 2007-06-19 16:14:08 -0700 (Tue, 19 Jun 2007)
New Revision: 929

Modified:
   index
   source
Log:
[e] (0) more examples of how innerHTML isn't going to always work

Modified: index
===================================================================
--- index	2007-06-19 22:52:03 UTC (rev 928)
+++ index	2007-06-19 23:14:08 UTC (rev 929)
@@ -3852,20 +3852,23 @@
    href="#entity-references">assumed to be expanded</a> by the user agent,
    and are therefore not covered in the algorithm above.
 
-  <p class=note>If the element's contents are not conformant, it is possible
-   that the roundtripping through <code title=dom-innerHTML-HTML><a
-   href="#innerhtml0">innerHTML</a></code> will not work. For instance, if
-   the element is a <code>textarea</code> element to which a <code
-   title="">Comment</code> node has been appended, then assigning <code
-   title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code> to
-   itself will result in the comment being displayed in the text field.
-   Similarly, if, as a result of DOM manipulation, the element contains a
-   comment that contains the literal string "<code title="">--></code>",
-   then when the result of serialising the element is parsed, the comment
-   will be truncated at that point and the rest of the comment will be
-   interpreted as markup. Another example would be making a <code><a
-   href="#script0">script</a></code> element contain a text node with the
-   text string "<code></script></code>".
+  <p class=note>It is possible that the roundtripping through <code
+   title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code> will
+   not work. For instance, if the element is a <code>textarea</code> element
+   to which a <code title="">Comment</code> node has been appended, then
+   assigning <code title=dom-innerHTML-HTML><a
+   href="#innerhtml0">innerHTML</a></code> to itself will result in the
+   comment being displayed in the text field. Similarly, if, as a result of
+   DOM manipulation, the element contains a comment that contains the literal
+   string "<code title="">--></code>", then when the result of serialising
+   the element is parsed, the comment will be truncated at that point and the
+   rest of the comment will be interpreted as markup. More examples would be
+   making a <code><a href="#script0">script</a></code> element contain a text
+   node with the text string "<code></script></code>", or having a
+   <code><a href="#p">p</a></code> element that contains a <code><a
+   href="#ul">ul</a></code> element (as the <code><a href="#ul">ul</a></code>
+   element's <span title=syntax-start-tag>start tag</span> would imply the
+   end tag for the <code><a href="#p">p</a></code>).
 
   <p>On setting, if the node is a document, the <code
    title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code> DOM

Modified: source
===================================================================
--- source	2007-06-19 22:52:03 UTC (rev 928)
+++ source	2007-06-19 23:14:08 UTC (rev 929)
@@ -2440,8 +2440,7 @@
   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">If the element's contents are not conformant, it is
-  possible that the roundtripping through <code
+  <p class="note">It is possible that the roundtripping through <code
   title="dom-innerHTML-HTML">innerHTML</code> will not work. For
   instance, if the element is a <code>textarea</code> element to which
   a <code title="">Comment</code> node has been appended, then
@@ -2451,9 +2450,12 @@
   contains a comment that contains the literal string "<code
   title="">--></code>", then when the result of serialising the
   element is parsed, the comment will be truncated at that point and
-  the rest of the comment will be interpreted as markup. Another
-  example would be making a <code>script</code> element contain a text
-  node with the text string "<code></script></code>".</p>
+  the rest of the comment will be interpreted as markup. More examples
+  would be making a <code>script</code> element contain a text node
+  with the text string "<code></script></code>", or having a
+  <code>p</code> element that contains a <code>ul</code> element (as
+  the <code>ul</code> element's <span title="syntax-start-tag">start
+  tag</span> would imply the end tag for the <code>p</code>).</p>
 
   <p>On setting, if the node is a document, the <code
   title="dom-innerHTML-HTML">innerHTML</code> DOM attribute must run




More information about the Commit-Watchers mailing list