@@ -57812,7 +57812,7 @@ o............A....e
57812
57812
data-x="attr-script-src">src</code> content attribute, and the <span>Should element's inline
57813
57813
behavior be blocked by Content Security Policy?</span> algorithm returns "<code
57814
57814
data-x="">Blocked</code>" when executed upon the <code>script</code> element, "<code
57815
- data-x="">script</code>", and the <code>script</code> element's <code >child text content</code >,
57815
+ data-x="">script</code>", and the <code>script</code> element's <span >child text content</span >,
57816
57816
then abort these steps. The script is not executed. <ref spec="CSP"></p></li>
57817
57817
57818
57818
<li id="script-processing-for">
@@ -108553,11 +108553,6 @@ document.body.appendChild(text);
108553
108553
<!-- also, i guess: image, but we don't list it because we don't consider it an "element",
108554
108554
more a "macro", and thus we should never serialize it -->
108555
108555
108556
- <p>If <var>current node</var> is a <code>pre</code>, <code>textarea</code>, or
108557
- <code>listing</code> element, and the first child node of the element, if any, is a
108558
- <code>Text</code> node whose character data has as its first character a U+000A LINE FEED
108559
- (LF) character, then append a U+000A LINE FEED (LF) character.</p>
108560
-
108561
108556
<p>Append the value of running the <span>HTML fragment serialization algorithm</span> on the
108562
108557
<var>current node</var> element (thus recursing into this algorithm for that
108563
108558
element), followed by a U+003C LESS-THAN SIGN character (<), a U+002F SOLIDUS character
@@ -108638,7 +108633,7 @@ document.body.appendChild(text);
108638
108633
<p class="warning">It is possible that the output of this algorithm, if parsed with an <span>HTML
108639
108634
parser</span>, will not return the original tree structure. Tree structures that do not roundtrip
108640
108635
a serialize and reparse step can also be produced by the <span>HTML parser</span> itself, although
108641
- such cases are non-conforming.</p>
108636
+ such cases are typically non-conforming.</p>
108642
108637
108643
108638
<div class="example">
108644
108639
@@ -108707,6 +108702,26 @@ document.body.appendChild(text);
108707
108702
108708
108703
</div>
108709
108704
108705
+ <p>For historical reasons, this algorithm does not round-trip an initial U+000A LINE FEED (LF)
108706
+ character in <code>pre</code>, <code>textarea</code>, or <code>listing</code> elements, even
108707
+ though (in the first two cases) the markup being round-tripped can be conforming. The <span>HTML
108708
+ parser</span> will drop such a character during parsing, but this algorithm does <em>not</em>
108709
+ serialize an extra U+000A LINE FEED (LF) character.</p>
108710
+ <!-- https://github.com/whatwg/html/issues/944 -->
108711
+
108712
+ <div class="example">
108713
+ <p>For example, consider the following markup:</p>
108714
+
108715
+ <pre><pre>
108716
+
108717
+ Hello.</pre></pre>
108718
+
108719
+ <p>When this document is first parsed, the <code>pre</code> element's <span>child text
108720
+ content</span> starts with a single newline character. After a serialize-reparse roundtrip, the
108721
+ <code>pre</code> element's <span>child text content</span> is simply "<code
108722
+ data-x="">Hello.</code>".</p>
108723
+ </div>
108724
+
108710
108725
<p><dfn id="escapingString">Escaping a string</dfn> (for the purposes of the algorithm above)
108711
108726
consists of running the following steps:</p>
108712
108727
0 commit comments