[html5] r5335 - [giow] (2) document.open('text/plain'); document.write(LF); should not eat the newline

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 24 12:57:03 PDT 2010


Author: ianh
Date: 2010-08-24 12:57:02 -0700 (Tue, 24 Aug 2010)
New Revision: 5335

Modified:
   complete.html
   index
   source
Log:
[giow] (2) document.open('text/plain');document.write(LF); should not eat the newline

Modified: complete.html
===================================================================
--- complete.html	2010-08-24 19:54:55 UTC (rev 5334)
+++ complete.html	2010-08-24 19:57:02 UTC (rev 5335)
@@ -11293,9 +11293,11 @@
     <p>If <var title="">type</var> is <em>not</em> now an <a href=#ascii-case-insensitive>ASCII
     case-insensitive</a> match for the string
     "<code><a href=#text/html>text/html</a></code>", then act as if the tokenizer had emitted
-    a start tag token with the tag name "pre", then switch the
-    <a href=#html-parser>HTML parser</a>'s tokenizer to the <a href=#plaintext-state>PLAINTEXT
-    state</a>.</p>
+    a start tag token with the tag name "pre" followed by a single
+    U+000A LINE FEED (LF) character<!-- to get eaten, so that a
+    leading LF in the written text doesn't get eaten itself-->, then
+    switch the <a href=#html-parser>HTML parser</a>'s tokenizer to the
+    <a href=#plaintext-state>PLAINTEXT state</a>.</p>
 
     <!--
  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E

Modified: index
===================================================================
--- index	2010-08-24 19:54:55 UTC (rev 5334)
+++ index	2010-08-24 19:57:02 UTC (rev 5335)
@@ -11215,9 +11215,11 @@
     <p>If <var title="">type</var> is <em>not</em> now an <a href=#ascii-case-insensitive>ASCII
     case-insensitive</a> match for the string
     "<code><a href=#text/html>text/html</a></code>", then act as if the tokenizer had emitted
-    a start tag token with the tag name "pre", then switch the
-    <a href=#html-parser>HTML parser</a>'s tokenizer to the <a href=#plaintext-state>PLAINTEXT
-    state</a>.</p>
+    a start tag token with the tag name "pre" followed by a single
+    U+000A LINE FEED (LF) character<!-- to get eaten, so that a
+    leading LF in the written text doesn't get eaten itself-->, then
+    switch the <a href=#html-parser>HTML parser</a>'s tokenizer to the
+    <a href=#plaintext-state>PLAINTEXT state</a>.</p>
 
     <!--
  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E

Modified: source
===================================================================
--- source	2010-08-24 19:54:55 UTC (rev 5334)
+++ source	2010-08-24 19:57:02 UTC (rev 5335)
@@ -11614,9 +11614,11 @@
     <p>If <var title="">type</var> is <em>not</em> now an <span>ASCII
     case-insensitive</span> match for the string
     "<code>text/html</code>", then act as if the tokenizer had emitted
-    a start tag token with the tag name "pre", then switch the
-    <span>HTML parser</span>'s tokenizer to the <span>PLAINTEXT
-    state</span>.</p>
+    a start tag token with the tag name "pre" followed by a single
+    U+000A LINE FEED (LF) character<!-- to get eaten, so that a
+    leading LF in the written text doesn't get eaten itself-->, then
+    switch the <span>HTML parser</span>'s tokenizer to the
+    <span>PLAINTEXT state</span>.</p>
 
     <!--
  http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E...%3Ciframe%3E%3C%2Fiframe%3E%3Cscript%3Eonload%20%3D%20function%20()%20%7B%20%0D%0A%20%20var%20d%20%3D%20document.getElementsByTagName('iframe')%5B0%5D.contentDocument%3B%0D%0A%20%20d.open('image%2Fsvg%2Bxml')%3B%0D%0A%20%20d.write(%22%3Cinput%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxhtml'%20value%3D'(x)html'%2F%3E%22)%3B%0D%0A%20%20d.close()%3B%0D%0A%7D%3B%3C%2Fscript%3E




More information about the Commit-Watchers mailing list