[html5] r4178 - [acgiow] (2) Redefine how to parse RCDATA and RAWTEXT elements, and introduce a [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Oct 19 17:32:04 PDT 2009


Author: ianh
Date: 2009-10-19 17:32:01 -0700 (Mon, 19 Oct 2009)
New Revision: 4178

Modified:
   complete.html
   index
   source
Log:
[acgiow] (2) Redefine how to parse RCDATA and RAWTEXT elements, and introduce a whole new way to parse <script> blocks, along with new rules for authors. This should improve compatibility with <script> parsing on the Web, but it might need a few more tweaks.

Modified: complete.html
===================================================================
--- complete.html	2009-10-19 11:00:31 UTC (rev 4177)
+++ complete.html	2009-10-20 00:32:01 UTC (rev 4178)
@@ -110,7 +110,7 @@
 
   <header class=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 19 October 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 20 October 2009</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -359,7 +359,8 @@
      <li><a href=#script><span class=secno>4.3.1 </span>The <code>script</code> element</a>
       <ol>
        <li><a href=#scriptingLanguages><span class=secno>4.3.1.1 </span>Scripting languages</a></li>
-       <li><a href=#inline-documentation-for-external-scripts><span class=secno>4.3.1.2 </span>Inline documentation for external scripts</a></ol></li>
+       <li><a href=#restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span>Restrictions for contents of <code>script</code> elements</a></li>
+       <li><a href=#inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span>Inline documentation for external scripts</a></ol></li>
      <li><a href=#the-noscript-element><span class=secno>4.3.2 </span>The <code>noscript</code> element</a></ol></li>
    <li><a href=#sections><span class=secno>4.4 </span>Sections</a>
     <ol>
@@ -1074,43 +1075,52 @@
        <li><a href=#script-data-escaped-state><span class=secno>11.2.4.21 </span>Script data escaped state</a></li>
        <li><a href=#script-data-escaped-dash-state><span class=secno>11.2.4.22 </span>Script data escaped dash state</a></li>
        <li><a href=#script-data-escaped-dash-dash-state><span class=secno>11.2.4.23 </span>Script data escaped dash dash state</a></li>
-       <li><a href=#before-attribute-name-state><span class=secno>11.2.4.24 </span>Before attribute name state</a></li>
-       <li><a href=#attribute-name-state><span class=secno>11.2.4.25 </span>Attribute name state</a></li>
-       <li><a href=#after-attribute-name-state><span class=secno>11.2.4.26 </span>After attribute name state</a></li>
-       <li><a href=#before-attribute-value-state><span class=secno>11.2.4.27 </span>Before attribute value state</a></li>
-       <li><a href=#attribute-value-(double-quoted)-state><span class=secno>11.2.4.28 </span>Attribute value (double-quoted) state</a></li>
-       <li><a href=#attribute-value-(single-quoted)-state><span class=secno>11.2.4.29 </span>Attribute value (single-quoted) state</a></li>
-       <li><a href=#attribute-value-(unquoted)-state><span class=secno>11.2.4.30 </span>Attribute value (unquoted) state</a></li>
-       <li><a href=#character-reference-in-attribute-value-state><span class=secno>11.2.4.31 </span>Character reference in attribute value state</a></li>
-       <li><a href=#after-attribute-value-(quoted)-state><span class=secno>11.2.4.32 </span>After attribute value (quoted) state</a></li>
-       <li><a href=#self-closing-start-tag-state><span class=secno>11.2.4.33 </span>Self-closing start tag state</a></li>
-       <li><a href=#bogus-comment-state><span class=secno>11.2.4.34 </span>Bogus comment state</a></li>
-       <li><a href=#markup-declaration-open-state><span class=secno>11.2.4.35 </span>Markup declaration open state</a></li>
-       <li><a href=#comment-start-state><span class=secno>11.2.4.36 </span>Comment start state</a></li>
-       <li><a href=#comment-start-dash-state><span class=secno>11.2.4.37 </span>Comment start dash state</a></li>
-       <li><a href=#comment-state><span class=secno>11.2.4.38 </span>Comment state</a></li>
-       <li><a href=#comment-end-dash-state><span class=secno>11.2.4.39 </span>Comment end dash state</a></li>
-       <li><a href=#comment-end-state><span class=secno>11.2.4.40 </span>Comment end state</a></li>
-       <li><a href=#comment-end-bang-state><span class=secno>11.2.4.41 </span>Comment end bang state</a></li>
-       <li><a href=#comment-end-space-state><span class=secno>11.2.4.42 </span>Comment end space state</a></li>
-       <li><a href=#doctype-state><span class=secno>11.2.4.43 </span>DOCTYPE state</a></li>
-       <li><a href=#before-doctype-name-state><span class=secno>11.2.4.44 </span>Before DOCTYPE name state</a></li>
-       <li><a href=#doctype-name-state><span class=secno>11.2.4.45 </span>DOCTYPE name state</a></li>
-       <li><a href=#after-doctype-name-state><span class=secno>11.2.4.46 </span>After DOCTYPE name state</a></li>
-       <li><a href=#after-doctype-public-keyword-state><span class=secno>11.2.4.47 </span>After DOCTYPE public keyword state</a></li>
-       <li><a href=#before-doctype-public-identifier-state><span class=secno>11.2.4.48 </span>Before DOCTYPE public identifier state</a></li>
-       <li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>11.2.4.49 </span>DOCTYPE public identifier (double-quoted) state</a></li>
-       <li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>11.2.4.50 </span>DOCTYPE public identifier (single-quoted) state</a></li>
-       <li><a href=#after-doctype-public-identifier-state><span class=secno>11.2.4.51 </span>After DOCTYPE public identifier state</a></li>
-       <li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>11.2.4.52 </span>Between DOCTYPE public and system identifiers state</a></li>
-       <li><a href=#after-doctype-system-keyword-state><span class=secno>11.2.4.53 </span>After DOCTYPE system keyword state</a></li>
-       <li><a href=#before-doctype-system-identifier-state><span class=secno>11.2.4.54 </span>Before DOCTYPE system identifier state</a></li>
-       <li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>11.2.4.55 </span>DOCTYPE system identifier (double-quoted) state</a></li>
-       <li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>11.2.4.56 </span>DOCTYPE system identifier (single-quoted) state</a></li>
-       <li><a href=#after-doctype-system-identifier-state><span class=secno>11.2.4.57 </span>After DOCTYPE system identifier state</a></li>
-       <li><a href=#bogus-doctype-state><span class=secno>11.2.4.58 </span>Bogus DOCTYPE state</a></li>
-       <li><a href=#cdata-section-state><span class=secno>11.2.4.59 </span>CDATA section state</a></li>
-       <li><a href=#tokenizing-character-references><span class=secno>11.2.4.60 </span>Tokenizing character references</a></ol></li>
+       <li><a href=#script-data-escaped-less-than-sign-state><span class=secno>11.2.4.24 </span>Script data escaped less-than sign state</a></li>
+       <li><a href=#script-data-escaped-end-tag-open-state><span class=secno>11.2.4.25 </span>Script data escaped end tag open state</a></li>
+       <li><a href=#script-data-escaped-end-tag-name-state><span class=secno>11.2.4.26 </span>Script data escaped end tag name state</a></li>
+       <li><a href=#script-data-double-escape-start-state><span class=secno>11.2.4.27 </span>Script data double escape start state</a></li>
+       <li><a href=#script-data-double-escaped-state><span class=secno>11.2.4.28 </span>Script data double escaped state</a></li>
+       <li><a href=#script-data-double-escaped-dash-state><span class=secno>11.2.4.29 </span>Script data double escaped dash state</a></li>
+       <li><a href=#script-data-double-escaped-dash-dash-state><span class=secno>11.2.4.30 </span>Script data double escaped dash dash state</a></li>
+       <li><a href=#script-data-double-escaped-less-than-sign-state><span class=secno>11.2.4.31 </span>Script data double escaped less-than sign state</a></li>
+       <li><a href=#script-data-double-escape-end-state><span class=secno>11.2.4.32 </span>Script data double escape end state</a></li>
+       <li><a href=#before-attribute-name-state><span class=secno>11.2.4.33 </span>Before attribute name state</a></li>
+       <li><a href=#attribute-name-state><span class=secno>11.2.4.34 </span>Attribute name state</a></li>
+       <li><a href=#after-attribute-name-state><span class=secno>11.2.4.35 </span>After attribute name state</a></li>
+       <li><a href=#before-attribute-value-state><span class=secno>11.2.4.36 </span>Before attribute value state</a></li>
+       <li><a href=#attribute-value-(double-quoted)-state><span class=secno>11.2.4.37 </span>Attribute value (double-quoted) state</a></li>
+       <li><a href=#attribute-value-(single-quoted)-state><span class=secno>11.2.4.38 </span>Attribute value (single-quoted) state</a></li>
+       <li><a href=#attribute-value-(unquoted)-state><span class=secno>11.2.4.39 </span>Attribute value (unquoted) state</a></li>
+       <li><a href=#character-reference-in-attribute-value-state><span class=secno>11.2.4.40 </span>Character reference in attribute value state</a></li>
+       <li><a href=#after-attribute-value-(quoted)-state><span class=secno>11.2.4.41 </span>After attribute value (quoted) state</a></li>
+       <li><a href=#self-closing-start-tag-state><span class=secno>11.2.4.42 </span>Self-closing start tag state</a></li>
+       <li><a href=#bogus-comment-state><span class=secno>11.2.4.43 </span>Bogus comment state</a></li>
+       <li><a href=#markup-declaration-open-state><span class=secno>11.2.4.44 </span>Markup declaration open state</a></li>
+       <li><a href=#comment-start-state><span class=secno>11.2.4.45 </span>Comment start state</a></li>
+       <li><a href=#comment-start-dash-state><span class=secno>11.2.4.46 </span>Comment start dash state</a></li>
+       <li><a href=#comment-state><span class=secno>11.2.4.47 </span>Comment state</a></li>
+       <li><a href=#comment-end-dash-state><span class=secno>11.2.4.48 </span>Comment end dash state</a></li>
+       <li><a href=#comment-end-state><span class=secno>11.2.4.49 </span>Comment end state</a></li>
+       <li><a href=#comment-end-bang-state><span class=secno>11.2.4.50 </span>Comment end bang state</a></li>
+       <li><a href=#comment-end-space-state><span class=secno>11.2.4.51 </span>Comment end space state</a></li>
+       <li><a href=#doctype-state><span class=secno>11.2.4.52 </span>DOCTYPE state</a></li>
+       <li><a href=#before-doctype-name-state><span class=secno>11.2.4.53 </span>Before DOCTYPE name state</a></li>
+       <li><a href=#doctype-name-state><span class=secno>11.2.4.54 </span>DOCTYPE name state</a></li>
+       <li><a href=#after-doctype-name-state><span class=secno>11.2.4.55 </span>After DOCTYPE name state</a></li>
+       <li><a href=#after-doctype-public-keyword-state><span class=secno>11.2.4.56 </span>After DOCTYPE public keyword state</a></li>
+       <li><a href=#before-doctype-public-identifier-state><span class=secno>11.2.4.57 </span>Before DOCTYPE public identifier state</a></li>
+       <li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>11.2.4.58 </span>DOCTYPE public identifier (double-quoted) state</a></li>
+       <li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>11.2.4.59 </span>DOCTYPE public identifier (single-quoted) state</a></li>
+       <li><a href=#after-doctype-public-identifier-state><span class=secno>11.2.4.60 </span>After DOCTYPE public identifier state</a></li>
+       <li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>11.2.4.61 </span>Between DOCTYPE public and system identifiers state</a></li>
+       <li><a href=#after-doctype-system-keyword-state><span class=secno>11.2.4.62 </span>After DOCTYPE system keyword state</a></li>
+       <li><a href=#before-doctype-system-identifier-state><span class=secno>11.2.4.63 </span>Before DOCTYPE system identifier state</a></li>
+       <li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>11.2.4.64 </span>DOCTYPE system identifier (double-quoted) state</a></li>
+       <li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>11.2.4.65 </span>DOCTYPE system identifier (single-quoted) state</a></li>
+       <li><a href=#after-doctype-system-identifier-state><span class=secno>11.2.4.66 </span>After DOCTYPE system identifier state</a></li>
+       <li><a href=#bogus-doctype-state><span class=secno>11.2.4.67 </span>Bogus DOCTYPE state</a></li>
+       <li><a href=#cdata-section-state><span class=secno>11.2.4.68 </span>CDATA section state</a></li>
+       <li><a href=#tokenizing-character-references><span class=secno>11.2.4.69 </span>Tokenizing character references</a></ol></li>
      <li><a href=#tree-construction><span class=secno>11.2.5 </span>Tree construction</a>
       <ol>
        <li><a href=#creating-and-inserting-elements><span class=secno>11.2.5.1 </span>Creating and inserting elements</a></li>
@@ -12193,10 +12203,12 @@
    <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
    <dt>Content model:</dt>
    <dd>If there is no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
-   attribute, depends on the value of the <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute.</dd>
+   attribute, depends on the value of the <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute, but must match
+   <a href=#restrictions-for-contents-of-script-elements>script content restrictions</a>.</dd>
    <dd>If there <em>is</em> a <code title=attr-script-src><a href=#attr-script-src>src</a></code>
    attribute, the element must be either empty or contain only
-   <a href=#inline-documentation-for-external-scripts>script documentation</a>.</dd>
+   <a href=#inline-documentation-for-external-scripts>script documentation</a> that also matches <a href=#restrictions-for-contents-of-script-elements>script
+   content restrictions</a>.</dd>
    <dt>Content attributes:</dt>
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dd><code title=attr-script-src><a href=#attr-script-src>src</a></code></dd>
@@ -12804,8 +12816,59 @@
   </div>
 
 
-  <h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.2 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
+  <h5 id=restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
 
+  <p>The contents of a <code><a href=#script>script</a></code> element must match the
+  <code title="">script</code> production in the following ABNF, the
+  character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+
+  <pre>script        = body1
+
+body1         = *( text1 / body2 )
+body2         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
+body3         = script-start *text3
+
+script-start  = lt       s c r i p t tag-end
+script-end    = lt slash s c r i p t tag-end
+
+text1         = <anything that doesn't match not-text1>
+text2         = <anything that doesn't match not-text2>
+text3         = <anything that doesn't match not-text3>
+
+not-text1     = "<!--" / script-end
+not-text2     = script-start / script-end / "-->"
+not-text3     = script-end / "-->"
+
+lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
+slash         =  %x002F ; U+002F SOLIDUS character (/)
+
+s             =  %x0053 ; U+0053 LATIN CAPITAL LETTER S
+s             =/ %x0073 ; U+0073 LATIN SMALL LETTER S
+c             =  %x0043 ; U+0043 LATIN CAPITAL LETTER C
+c             =/ %x0063 ; U+0063 LATIN SMALL LETTER C
+r             =  %x0052 ; U+0052 LATIN CAPITAL LETTER R
+r             =/ %x0072 ; U+0072 LATIN SMALL LETTER R
+i             =  %x0049 ; U+0049 LATIN CAPITAL LETTER I
+i             =/ %x0069 ; U+0069 LATIN SMALL LETTER I
+p             =  %x0050 ; U+0050 LATIN CAPITAL LETTER P
+p             =/ %x0070 ; U+0070 LATIN SMALL LETTER P
+t             =  %x0054 ; U+0054 LATIN CAPITAL LETTER T
+t             =/ %x0074 ; U+0074 LATIN SMALL LETTER T
+
+tag-end       =  %x0009 ; U+0009 CHARACTER TABULATION
+tag-end       =/ %x000A ; U+000A LINE FEED (LF)
+tag-end       =/ %x000C ; U+000C FORM FEED (FF)
+tag-end       =/ %x0020 ; U+0020 SPACE
+tag-end       =/ %x002F ; U+002F SOLIDUS (/)
+tag-end       =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
+
+  <p>When a <code><a href=#script>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script
+  documentation</a>, there are further restrictions on the contents
+  of the element, as described in the section below.</p>
+
+
+  <h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
+
   <p>If a <code><a href=#script>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is specified, then the
   contents of the <code><a href=#script>script</a></code> element, if any, must be such
   that the value of the DOM <code title=dom-script-text><a href=#dom-script-text>text</a></code>
@@ -12833,6 +12896,10 @@
   <p class=note>This corresponds to putting the contents of the
   element in JavaScript comments.</p>
 
+  <p class=note>This requirement is in addition to the earlier
+  restrictiosn on the syntax of contents of <code><a href=#script>script</a></code>
+  elements.</p>
+
   <div class=example>
 
    <p>This allows authors to include documentation, such as license
@@ -68948,41 +69015,9 @@
   case-insensitively match the tag name of the element followed by one
   of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM
   FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E
-  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that string is
-  part of an <a href=#syntax-escape title=syntax-escape>escaping text
-  span</a>.</p>
+  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/).</p>
 
-  <p>An <dfn id=syntax-escape title=syntax-escape>escaping text span</dfn> is a span
-  of <a href=#syntax-text title=syntax-text>text</a> that starts with an <a href=#syntax-escape-start title=syntax-escape-start>escaping text span start</a> that is
-  not itself in an <a href=#syntax-escape title=syntax-escape>escaping text
-  span</a>, and ends at the next <a href=#syntax-escape-end title=syntax-escape-end>escaping text span end</a>. There
-  cannot be any <a href=#syntax-charref title=syntax-charref>character
-  references</a> inside an <a href=#syntax-escape title=syntax-escape>escaping
-  text span</a> — sequences of characters that would look
-  like <a href=#syntax-charref title=syntax-charref>character references</a> do not
-  have special meaning.</p>
 
-  <p>An <dfn id=syntax-escape-start title=syntax-escape-start>escaping text span
-  start</dfn> is a part of <a href=#syntax-text title=syntax-text>text</a> that
-  consists of the four character sequence "<code title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
-  MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</p>
-
-  <p>An <dfn id=syntax-escape-end title=syntax-escape-end>escaping text span end</dfn> is
-  a part of <a href=#syntax-text title=syntax-text>text</a> that consists of the
-  three character sequence "<code title="">--></code>" (U+002D
-  HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</p>
-
-  <p>An <a href=#syntax-escape-start title=syntax-escape-start>escaping text span
-  start</a> may share its U+002D HYPHEN-MINUS characters with its
-  corresponding <a href=#syntax-escape-end title=syntax-escape-end>escaping text span
-  end</a>.</p>
-
-  <p>The text in <a href=#raw-text-elements>raw text elements</a> and <a href=#rcdata-elements>RCDATA
-  elements</a> must not have an <a href=#syntax-escape-start title=syntax-escape-start>escaping text span start</a> that is
-  not followed by an <a href=#syntax-escape-end title=syntax-escape-end>escaping text
-  span end</a>.</p>
-
-
   <h4 id=text-0><span class=secno>11.1.3 </span>Text</h4>
 
   <p><dfn id=syntax-text title=syntax-text>Text</dfn> is allowed inside elements,
@@ -70881,13 +70916,13 @@
    character</a> (add 0x0020 to the character's code point) to the
    current tag token's tag name. Append the <a href=#current-input-character>current input
    character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
-   <a href=#script-data-end-tag-name-state>Script data end tag name state</a>.</dd>
+   <a href=#script-data-end-tag-name-state>script data end tag name state</a>.</dd>
 
    <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
    <dd>Append the <a href=#current-input-character>current input character</a> to the current
    tag token's tag name. Append the <a href=#current-input-character>current input
    character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
-   <a href=#script-data-end-tag-name-state>Script data end tag name state</a>.</dd>
+   <a href=#script-data-end-tag-name-state>script data end tag name state</a>.</dd>
 
    <dt>Anything else</dt>
    <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
@@ -70928,13 +70963,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <a href=#script-data-escaped-dash-state>script data escaped dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>EOF</dt>
    <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Stay in
-   the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Stay in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
   </dl><h5 id=script-data-escaped-dash-state><span class=secno>11.2.4.22 </span><dfn>Script data escaped dash state</dfn></h5>
 
@@ -70944,13 +70983,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <a href=#script-data-escaped-dash-dash-state>script data escaped dash dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>EOF</dt>
    <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
   </dl><h5 id=script-data-escaped-dash-dash-state><span class=secno>11.2.4.23 </span><dfn>Script data escaped dash dash state</dfn></h5>
 
@@ -70960,6 +71003,10 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
    <a href=#script-data-escaped-dash-dash-state>script data escaped dash dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>U+003E GREATER-THAN SIGN (>)</dt>
    <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
    <a href=#script-data-state>script data state</a>.</dd>
@@ -70969,18 +71016,269 @@
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
-  </dl><h5 id=before-attribute-name-state><span class=secno>11.2.4.24 </span><dfn>Before attribute name state</dfn></h5>
+  </dl><h5 id=script-data-escaped-less-than-sign-state><span class=secno>11.2.4.24 </span><dfn>Script data escaped less-than sign state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
+  <dl class=switch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch
+   to the <a href=#script-data-escaped-end-tag-open-state>script data escaped end tag open state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <a href=#current-input-character>current input character</a> as a character token. Set the
+   <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the
+   lowercase version of the <a href=#current-input-character>current input character</a> (add
+   0x0020 to the character's code point) to the <var><a href=#temporary-buffer>temporary
+   buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state>script data double escape start
+   state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <a href=#current-input-character>current input character</a> as a character token. Set the
+   <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the
+   <a href=#current-input-character>current input character</a> to the <var><a href=#temporary-buffer>temporary
+   buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state>script data double escape start
+   state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and reconsume the
+   <a href=#current-input-character>current input character</a> in the <a href=#script-data-escaped-state>script data
+   escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-escaped-end-tag-open-state><span class=secno>11.2.4.25 </span><dfn>Script data escaped end tag open state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   lowercase version of the <a href=#current-input-character>current input character</a> (add
+   0x0020 to the character's code point). Append the <a href=#current-input-character>current
+   input character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Finally,
+   switch to the <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name
+   state</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   <a href=#current-input-character>current input character</a>. Append the <a href=#current-input-character>current
+   input character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Finally,
+   switch to the <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name
+   state</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, and reconsume the <a href=#current-input-character>current input
+   character</a> in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-escaped-end-tag-name-state><span class=secno>11.2.4.26 </span><dfn>Script data escaped end tag name state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
   <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
    <dt>U+000A LINE FEED (LF)</dt>
    <dt>U+000C FORM FEED (FF)</dt>
    <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
    <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then switch to the <a href=#before-attribute-name-state>before attribute name
+   state</a>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then switch to the <a href=#self-closing-start-tag-state>self-closing start tag
+   state</a>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then emit the current tag token and switch to the
+   <a href=#data-state>data state</a>. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   current tag token's tag name. Append the <a href=#current-input-character>current input
+   character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
+   <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Append the <a href=#current-input-character>current input character</a> to the current
+   tag token's tag name. Append the <a href=#current-input-character>current input
+   character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
+   <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, a character token for each of the characters in
+   the <var><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to
+   the buffer), and reconsume the <a href=#current-input-character>current input character</a>
+   in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escape-start-state><span class=secno>11.2.4.27 </span><dfn>Script data double escape start state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. If the <var><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code title="">script</code>", then switch to the <a href=#script-data-double-escaped-state>script data
+   double escaped state</a>. Otherwise, switch to the <a href=#script-data-escaped-state>script
+   data escaped state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-start-state>script data double
+   escape start state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the <a href=#current-input-character>current input character</a> to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-start-state>script data double
+   escape start state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-state><span class=secno>11.2.4.28 </span><dfn>Script data double escaped state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <a href=#script-data-double-escaped-dash-state>script data double escaped dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Stay in the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-dash-state><span class=secno>11.2.4.29 </span><dfn>Script data double escaped dash state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <a href=#script-data-double-escaped-dash-dash-state>script data double escaped dash dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-dash-dash-state><span class=secno>11.2.4.30 </span><dfn>Script data double escaped dash dash state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
+   <a href=#script-data-double-escaped-dash-dash-state>script data double escaped dash dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
+   <a href=#script-data-state>script data state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-less-than-sign-state><span class=secno>11.2.4.31 </span><dfn>Script data double escaped less-than sign state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Emit a U+002F SOLIDUS character token. Set the <var><a href=#temporary-buffer>temporary
+   buffer</a></var> to the empty string. Switch to the <a href=#script-data-double-escape-end-state>script data
+   double escape end state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-double-escaped-state>script data double escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escape-end-state><span class=secno>11.2.4.32 </span><dfn>Script data double escape end state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. If the <var><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code title="">script</code>", then switch to the <a href=#script-data-escaped-state>script data
+   escaped state</a>. Otherwise, switch to the <a href=#script-data-double-escaped-state>script data
+   double escaped state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-end-state>script data double
+   escape end state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the <a href=#current-input-character>current input character</a> to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-end-state>script data double
+   escape end state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-double-escaped-state>script data double escaped state</a>.</dd>
+
+  </dl><h5 id=before-attribute-name-state><span class=secno>11.2.4.33 </span><dfn>Before attribute name state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
    <dd>Stay in the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
    <dt>U+002F SOLIDUS (/)</dt>
@@ -71014,7 +71312,7 @@
    the empty string. Switch to the <a href=#attribute-name-state>attribute name
    state</a>.</dd>
 
-  </dl><h5 id=attribute-name-state><span class=secno>11.2.4.25 </span><dfn>Attribute name state</dfn></h5>
+  </dl><h5 id=attribute-name-state><span class=secno>11.2.4.34 </span><dfn>Attribute name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71065,7 +71363,7 @@
   associated with it (if any).</p>
 
 
-  <h5 id=after-attribute-name-state><span class=secno>11.2.4.26 </span><dfn>After attribute name state</dfn></h5>
+  <h5 id=after-attribute-name-state><span class=secno>11.2.4.35 </span><dfn>After attribute name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71109,7 +71407,7 @@
    its value to the empty string. Switch to the <a href=#attribute-name-state>attribute name
    state</a>.</dd>
 
-  </dl><h5 id=before-attribute-value-state><span class=secno>11.2.4.27 </span><dfn>Before attribute value state</dfn></h5>
+  </dl><h5 id=before-attribute-value-state><span class=secno>11.2.4.36 </span><dfn>Before attribute value state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71149,7 +71447,7 @@
    attribute's value. Switch to the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
    state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(double-quoted)-state><span class=secno>11.2.4.28 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(double-quoted)-state><span class=secno>11.2.4.37 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71171,7 +71469,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(double-quoted)-state>attribute value
    (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(single-quoted)-state><span class=secno>11.2.4.29 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(single-quoted)-state><span class=secno>11.2.4.38 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71193,7 +71491,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(single-quoted)-state>attribute value
    (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(unquoted)-state><span class=secno>11.2.4.30 </span><dfn>Attribute value (unquoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(unquoted)-state><span class=secno>11.2.4.39 </span><dfn>Attribute value (unquoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71230,7 +71528,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
    state</a>.</dd>
 
-  </dl><h5 id=character-reference-in-attribute-value-state><span class=secno>11.2.4.31 </span><dfn>Character reference in attribute value state</dfn></h5>
+  </dl><h5 id=character-reference-in-attribute-value-state><span class=secno>11.2.4.40 </span><dfn>Character reference in attribute value state</dfn></h5>
 
   <p>Attempt to <a href=#consume-a-character-reference>consume a character reference</a>.</p>
 
@@ -71244,7 +71542,7 @@
   in when were switched into this state.</p>
 
 
-  <h5 id=after-attribute-value-(quoted)-state><span class=secno>11.2.4.32 </span><dfn>After attribute value (quoted) state</dfn></h5>
+  <h5 id=after-attribute-value-(quoted)-state><span class=secno>11.2.4.41 </span><dfn>After attribute value (quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71270,7 +71568,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the character in
    the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
-  </dl><h5 id=self-closing-start-tag-state><span class=secno>11.2.4.33 </span><dfn>Self-closing start tag state</dfn></h5>
+  </dl><h5 id=self-closing-start-tag-state><span class=secno>11.2.4.42 </span><dfn>Self-closing start tag state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71287,7 +71585,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the character in
    the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
-  </dl><h5 id=bogus-comment-state><span class=secno>11.2.4.34 </span><dfn>Bogus comment state</dfn></h5>
+  </dl><h5 id=bogus-comment-state><span class=secno>11.2.4.43 </span><dfn>Bogus comment state</dfn></h5>
 
   <p>Consume every character up to and including the first U+003E
   GREATER-THAN SIGN character (>) or the end of the file (EOF),
@@ -71305,7 +71603,7 @@
   character.</p>
 
 
-  <h5 id=markup-declaration-open-state><span class=secno>11.2.4.35 </span><dfn>Markup declaration open state</dfn></h5>
+  <h5 id=markup-declaration-open-state><span class=secno>11.2.4.44 </span><dfn>Markup declaration open state</dfn></h5>
 
   <p>If the next two characters are both U+002D HYPHEN-MINUS (-)
   characters, consume those two characters, create a comment token
@@ -71330,7 +71628,7 @@
   comment.</p>
 
 
-  <h5 id=comment-start-state><span class=secno>11.2.4.36 </span><dfn>Comment start state</dfn></h5>
+  <h5 id=comment-start-state><span class=secno>11.2.4.45 </span><dfn>Comment start state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71350,7 +71648,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment
    token's data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-start-dash-state><span class=secno>11.2.4.37 </span><dfn>Comment start dash state</dfn></h5>
+  </dl><h5 id=comment-start-dash-state><span class=secno>11.2.4.46 </span><dfn>Comment start dash state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71371,7 +71669,7 @@
    <a href=#current-input-character>current input character</a> to the comment token's
    data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-state><span class=secno>11.2.4.38 </span><dfn id=comment>Comment state</dfn></h5>
+  </dl><h5 id=comment-state><span class=secno>11.2.4.47 </span><dfn id=comment>Comment state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71387,7 +71685,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment
    token's data. Stay in the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-dash-state><span class=secno>11.2.4.39 </span><dfn>Comment end dash state</dfn></h5>
+  </dl><h5 id=comment-end-dash-state><span class=secno>11.2.4.48 </span><dfn>Comment end dash state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71404,7 +71702,7 @@
    <a href=#current-input-character>current input character</a> to the comment token's
    data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-state><span class=secno>11.2.4.40 </span><dfn>Comment end state</dfn></h5>
+  </dl><h5 id=comment-end-state><span class=secno>11.2.4.49 </span><dfn>Comment end state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71445,7 +71743,7 @@
    comment token's data. Switch to the <a href=#comment-state>comment
    state</a>.</dd>
 
-  </dl><h5 id=comment-end-bang-state><span class=secno>11.2.4.41 </span><dfn>Comment end bang state</dfn></h5>
+  </dl><h5 id=comment-end-bang-state><span class=secno>11.2.4.50 </span><dfn>Comment end bang state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71469,7 +71767,7 @@
    character</a> to the comment token's data. Switch to the
    <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-space-state><span class=secno>11.2.4.42 </span><dfn>Comment end space state</dfn></h5>
+  </dl><h5 id=comment-end-space-state><span class=secno>11.2.4.51 </span><dfn>Comment end space state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71497,7 +71795,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment token's data. Switch
    to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=doctype-state><span class=secno>11.2.4.43 </span><dfn>DOCTYPE state</dfn></h5>
+  </dl><h5 id=doctype-state><span class=secno>11.2.4.52 </span><dfn>DOCTYPE state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71517,7 +71815,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current
    character in the <a href=#before-doctype-name-state>before DOCTYPE name state</a>.</dd>
 
-  </dl><h5 id=before-doctype-name-state><span class=secno>11.2.4.44 </span><dfn>Before DOCTYPE name state</dfn></h5>
+  </dl><h5 id=before-doctype-name-state><span class=secno>11.2.4.53 </span><dfn>Before DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71549,7 +71847,7 @@
    <a href=#current-input-character>current input character</a>. Switch to the <a href=#doctype-name-state>DOCTYPE name
    state</a>.</dd>
 
-  </dl><h5 id=doctype-name-state><span class=secno>11.2.4.45 </span><dfn>DOCTYPE name state</dfn></h5>
+  </dl><h5 id=doctype-name-state><span class=secno>11.2.4.54 </span><dfn>DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71580,7 +71878,7 @@
    DOCTYPE token's name. Stay in the <a href=#doctype-name-state>DOCTYPE name
    state</a>.</dd>
 
-  </dl><h5 id=after-doctype-name-state><span class=secno>11.2.4.46 </span><dfn>After DOCTYPE name state</dfn></h5>
+  </dl><h5 id=after-doctype-name-state><span class=secno>11.2.4.55 </span><dfn>After DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71620,7 +71918,7 @@
 
    </dd>
 
-  </dl><h5 id=after-doctype-public-keyword-state><span class=secno>11.2.4.47 </span><dfn>After DOCTYPE public keyword state</dfn></h5>
+  </dl><h5 id=after-doctype-public-keyword-state><span class=secno>11.2.4.56 </span><dfn>After DOCTYPE public keyword state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71641,7 +71939,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current character in
    the <a href=#before-doctype-public-identifier-state>before DOCTYPE public identifier state</a>.</dd>
 
-  </dl><h5 id=before-doctype-public-identifier-state><span class=secno>11.2.4.48 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
+  </dl><h5 id=before-doctype-public-identifier-state><span class=secno>11.2.4.57 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71677,7 +71975,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>11.2.4.49 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>11.2.4.58 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71699,7 +71997,7 @@
    token's public identifier. Stay in the <a href=#doctype-public-identifier-(double-quoted)-state>DOCTYPE public
    identifier (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>11.2.4.50 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>11.2.4.59 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71721,7 +72019,7 @@
    token's public identifier. Stay in the <a href=#doctype-public-identifier-(single-quoted)-state>DOCTYPE public
    identifier (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=after-doctype-public-identifier-state><span class=secno>11.2.4.51 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
+  </dl><h5 id=after-doctype-public-identifier-state><span class=secno>11.2.4.60 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71757,7 +72055,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>11.2.4.52 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
+  </dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>11.2.4.61 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71793,7 +72091,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=after-doctype-system-keyword-state><span class=secno>11.2.4.53 </span><dfn>After DOCTYPE system keyword state</dfn></h5>
+  </dl><h5 id=after-doctype-system-keyword-state><span class=secno>11.2.4.62 </span><dfn>After DOCTYPE system keyword state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71814,7 +72112,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current character in
    the <a href=#before-doctype-system-identifier-state>before DOCTYPE system identifier state</a>.</dd>
 
-  </dl><h5 id=before-doctype-system-identifier-state><span class=secno>11.2.4.54 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
+  </dl><h5 id=before-doctype-system-identifier-state><span class=secno>11.2.4.63 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71850,7 +72148,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>11.2.4.55 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>11.2.4.64 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71873,7 +72171,7 @@
    DOCTYPE token's system identifier. Stay in the <a href=#doctype-system-identifier-(double-quoted)-state>DOCTYPE system
    identifier (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>11.2.4.56 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>11.2.4.65 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71896,7 +72194,7 @@
    DOCTYPE token's system identifier. Stay in the <a href=#doctype-system-identifier-(single-quoted)-state>DOCTYPE system
    identifier (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=after-doctype-system-identifier-state><span class=secno>11.2.4.57 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
+  </dl><h5 id=after-doctype-system-identifier-state><span class=secno>11.2.4.66 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71922,7 +72220,7 @@
    state</a>. (This does <em>not</em> set the DOCTYPE token's
    <i>force-quirks flag</i> to <i>on</i>.)</dd>
 
-  </dl><h5 id=bogus-doctype-state><span class=secno>11.2.4.58 </span><dfn>Bogus DOCTYPE state</dfn></h5>
+  </dl><h5 id=bogus-doctype-state><span class=secno>11.2.4.67 </span><dfn>Bogus DOCTYPE state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -71937,7 +72235,7 @@
    <dt>Anything else</dt>
    <dd>Stay in the <a href=#bogus-doctype-state>bogus DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=cdata-section-state><span class=secno>11.2.4.59 </span><dfn>CDATA section state</dfn></h5>
+  </dl><h5 id=cdata-section-state><span class=secno>11.2.4.68 </span><dfn>CDATA section state</dfn></h5>
 
   <p>Consume every character up to the next occurrence of the three
   character sequence U+005D RIGHT SQUARE BRACKET U+005D RIGHT SQUARE
@@ -71954,7 +72252,7 @@
 
 
 
-  <h5 id=tokenizing-character-references><span class=secno>11.2.4.60 </span>Tokenizing character references</h5>
+  <h5 id=tokenizing-character-references><span class=secno>11.2.4.69 </span>Tokenizing character references</h5>
 
   <p>This section defines how to <dfn id=consume-a-character-reference>consume a character
   reference</dfn>. This definition is used when parsing character

Modified: index
===================================================================
--- index	2009-10-19 11:00:31 UTC (rev 4177)
+++ index	2009-10-20 00:32:01 UTC (rev 4178)
@@ -111,7 +111,7 @@
 
   <header class=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <hgroup><h1>HTML5</h1>
-    <h2 class="no-num no-toc">Draft Standard — 19 October 2009</h2>
+    <h2 class="no-num no-toc">Draft Standard — 20 October 2009</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -349,7 +349,8 @@
      <li><a href=#script><span class=secno>4.3.1 </span>The <code>script</code> element</a>
       <ol>
        <li><a href=#scriptingLanguages><span class=secno>4.3.1.1 </span>Scripting languages</a></li>
-       <li><a href=#inline-documentation-for-external-scripts><span class=secno>4.3.1.2 </span>Inline documentation for external scripts</a></ol></li>
+       <li><a href=#restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span>Restrictions for contents of <code>script</code> elements</a></li>
+       <li><a href=#inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span>Inline documentation for external scripts</a></ol></li>
      <li><a href=#the-noscript-element><span class=secno>4.3.2 </span>The <code>noscript</code> element</a></ol></li>
    <li><a href=#sections><span class=secno>4.4 </span>Sections</a>
     <ol>
@@ -903,43 +904,52 @@
        <li><a href=#script-data-escaped-state><span class=secno>9.2.4.21 </span>Script data escaped state</a></li>
        <li><a href=#script-data-escaped-dash-state><span class=secno>9.2.4.22 </span>Script data escaped dash state</a></li>
        <li><a href=#script-data-escaped-dash-dash-state><span class=secno>9.2.4.23 </span>Script data escaped dash dash state</a></li>
-       <li><a href=#before-attribute-name-state><span class=secno>9.2.4.24 </span>Before attribute name state</a></li>
-       <li><a href=#attribute-name-state><span class=secno>9.2.4.25 </span>Attribute name state</a></li>
-       <li><a href=#after-attribute-name-state><span class=secno>9.2.4.26 </span>After attribute name state</a></li>
-       <li><a href=#before-attribute-value-state><span class=secno>9.2.4.27 </span>Before attribute value state</a></li>
-       <li><a href=#attribute-value-(double-quoted)-state><span class=secno>9.2.4.28 </span>Attribute value (double-quoted) state</a></li>
-       <li><a href=#attribute-value-(single-quoted)-state><span class=secno>9.2.4.29 </span>Attribute value (single-quoted) state</a></li>
-       <li><a href=#attribute-value-(unquoted)-state><span class=secno>9.2.4.30 </span>Attribute value (unquoted) state</a></li>
-       <li><a href=#character-reference-in-attribute-value-state><span class=secno>9.2.4.31 </span>Character reference in attribute value state</a></li>
-       <li><a href=#after-attribute-value-(quoted)-state><span class=secno>9.2.4.32 </span>After attribute value (quoted) state</a></li>
-       <li><a href=#self-closing-start-tag-state><span class=secno>9.2.4.33 </span>Self-closing start tag state</a></li>
-       <li><a href=#bogus-comment-state><span class=secno>9.2.4.34 </span>Bogus comment state</a></li>
-       <li><a href=#markup-declaration-open-state><span class=secno>9.2.4.35 </span>Markup declaration open state</a></li>
-       <li><a href=#comment-start-state><span class=secno>9.2.4.36 </span>Comment start state</a></li>
-       <li><a href=#comment-start-dash-state><span class=secno>9.2.4.37 </span>Comment start dash state</a></li>
-       <li><a href=#comment-state><span class=secno>9.2.4.38 </span>Comment state</a></li>
-       <li><a href=#comment-end-dash-state><span class=secno>9.2.4.39 </span>Comment end dash state</a></li>
-       <li><a href=#comment-end-state><span class=secno>9.2.4.40 </span>Comment end state</a></li>
-       <li><a href=#comment-end-bang-state><span class=secno>9.2.4.41 </span>Comment end bang state</a></li>
-       <li><a href=#comment-end-space-state><span class=secno>9.2.4.42 </span>Comment end space state</a></li>
-       <li><a href=#doctype-state><span class=secno>9.2.4.43 </span>DOCTYPE state</a></li>
-       <li><a href=#before-doctype-name-state><span class=secno>9.2.4.44 </span>Before DOCTYPE name state</a></li>
-       <li><a href=#doctype-name-state><span class=secno>9.2.4.45 </span>DOCTYPE name state</a></li>
-       <li><a href=#after-doctype-name-state><span class=secno>9.2.4.46 </span>After DOCTYPE name state</a></li>
-       <li><a href=#after-doctype-public-keyword-state><span class=secno>9.2.4.47 </span>After DOCTYPE public keyword state</a></li>
-       <li><a href=#before-doctype-public-identifier-state><span class=secno>9.2.4.48 </span>Before DOCTYPE public identifier state</a></li>
-       <li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>9.2.4.49 </span>DOCTYPE public identifier (double-quoted) state</a></li>
-       <li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>9.2.4.50 </span>DOCTYPE public identifier (single-quoted) state</a></li>
-       <li><a href=#after-doctype-public-identifier-state><span class=secno>9.2.4.51 </span>After DOCTYPE public identifier state</a></li>
-       <li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>9.2.4.52 </span>Between DOCTYPE public and system identifiers state</a></li>
-       <li><a href=#after-doctype-system-keyword-state><span class=secno>9.2.4.53 </span>After DOCTYPE system keyword state</a></li>
-       <li><a href=#before-doctype-system-identifier-state><span class=secno>9.2.4.54 </span>Before DOCTYPE system identifier state</a></li>
-       <li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>9.2.4.55 </span>DOCTYPE system identifier (double-quoted) state</a></li>
-       <li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>9.2.4.56 </span>DOCTYPE system identifier (single-quoted) state</a></li>
-       <li><a href=#after-doctype-system-identifier-state><span class=secno>9.2.4.57 </span>After DOCTYPE system identifier state</a></li>
-       <li><a href=#bogus-doctype-state><span class=secno>9.2.4.58 </span>Bogus DOCTYPE state</a></li>
-       <li><a href=#cdata-section-state><span class=secno>9.2.4.59 </span>CDATA section state</a></li>
-       <li><a href=#tokenizing-character-references><span class=secno>9.2.4.60 </span>Tokenizing character references</a></ol></li>
+       <li><a href=#script-data-escaped-less-than-sign-state><span class=secno>9.2.4.24 </span>Script data escaped less-than sign state</a></li>
+       <li><a href=#script-data-escaped-end-tag-open-state><span class=secno>9.2.4.25 </span>Script data escaped end tag open state</a></li>
+       <li><a href=#script-data-escaped-end-tag-name-state><span class=secno>9.2.4.26 </span>Script data escaped end tag name state</a></li>
+       <li><a href=#script-data-double-escape-start-state><span class=secno>9.2.4.27 </span>Script data double escape start state</a></li>
+       <li><a href=#script-data-double-escaped-state><span class=secno>9.2.4.28 </span>Script data double escaped state</a></li>
+       <li><a href=#script-data-double-escaped-dash-state><span class=secno>9.2.4.29 </span>Script data double escaped dash state</a></li>
+       <li><a href=#script-data-double-escaped-dash-dash-state><span class=secno>9.2.4.30 </span>Script data double escaped dash dash state</a></li>
+       <li><a href=#script-data-double-escaped-less-than-sign-state><span class=secno>9.2.4.31 </span>Script data double escaped less-than sign state</a></li>
+       <li><a href=#script-data-double-escape-end-state><span class=secno>9.2.4.32 </span>Script data double escape end state</a></li>
+       <li><a href=#before-attribute-name-state><span class=secno>9.2.4.33 </span>Before attribute name state</a></li>
+       <li><a href=#attribute-name-state><span class=secno>9.2.4.34 </span>Attribute name state</a></li>
+       <li><a href=#after-attribute-name-state><span class=secno>9.2.4.35 </span>After attribute name state</a></li>
+       <li><a href=#before-attribute-value-state><span class=secno>9.2.4.36 </span>Before attribute value state</a></li>
+       <li><a href=#attribute-value-(double-quoted)-state><span class=secno>9.2.4.37 </span>Attribute value (double-quoted) state</a></li>
+       <li><a href=#attribute-value-(single-quoted)-state><span class=secno>9.2.4.38 </span>Attribute value (single-quoted) state</a></li>
+       <li><a href=#attribute-value-(unquoted)-state><span class=secno>9.2.4.39 </span>Attribute value (unquoted) state</a></li>
+       <li><a href=#character-reference-in-attribute-value-state><span class=secno>9.2.4.40 </span>Character reference in attribute value state</a></li>
+       <li><a href=#after-attribute-value-(quoted)-state><span class=secno>9.2.4.41 </span>After attribute value (quoted) state</a></li>
+       <li><a href=#self-closing-start-tag-state><span class=secno>9.2.4.42 </span>Self-closing start tag state</a></li>
+       <li><a href=#bogus-comment-state><span class=secno>9.2.4.43 </span>Bogus comment state</a></li>
+       <li><a href=#markup-declaration-open-state><span class=secno>9.2.4.44 </span>Markup declaration open state</a></li>
+       <li><a href=#comment-start-state><span class=secno>9.2.4.45 </span>Comment start state</a></li>
+       <li><a href=#comment-start-dash-state><span class=secno>9.2.4.46 </span>Comment start dash state</a></li>
+       <li><a href=#comment-state><span class=secno>9.2.4.47 </span>Comment state</a></li>
+       <li><a href=#comment-end-dash-state><span class=secno>9.2.4.48 </span>Comment end dash state</a></li>
+       <li><a href=#comment-end-state><span class=secno>9.2.4.49 </span>Comment end state</a></li>
+       <li><a href=#comment-end-bang-state><span class=secno>9.2.4.50 </span>Comment end bang state</a></li>
+       <li><a href=#comment-end-space-state><span class=secno>9.2.4.51 </span>Comment end space state</a></li>
+       <li><a href=#doctype-state><span class=secno>9.2.4.52 </span>DOCTYPE state</a></li>
+       <li><a href=#before-doctype-name-state><span class=secno>9.2.4.53 </span>Before DOCTYPE name state</a></li>
+       <li><a href=#doctype-name-state><span class=secno>9.2.4.54 </span>DOCTYPE name state</a></li>
+       <li><a href=#after-doctype-name-state><span class=secno>9.2.4.55 </span>After DOCTYPE name state</a></li>
+       <li><a href=#after-doctype-public-keyword-state><span class=secno>9.2.4.56 </span>After DOCTYPE public keyword state</a></li>
+       <li><a href=#before-doctype-public-identifier-state><span class=secno>9.2.4.57 </span>Before DOCTYPE public identifier state</a></li>
+       <li><a href=#doctype-public-identifier-(double-quoted)-state><span class=secno>9.2.4.58 </span>DOCTYPE public identifier (double-quoted) state</a></li>
+       <li><a href=#doctype-public-identifier-(single-quoted)-state><span class=secno>9.2.4.59 </span>DOCTYPE public identifier (single-quoted) state</a></li>
+       <li><a href=#after-doctype-public-identifier-state><span class=secno>9.2.4.60 </span>After DOCTYPE public identifier state</a></li>
+       <li><a href=#between-doctype-public-and-system-identifiers-state><span class=secno>9.2.4.61 </span>Between DOCTYPE public and system identifiers state</a></li>
+       <li><a href=#after-doctype-system-keyword-state><span class=secno>9.2.4.62 </span>After DOCTYPE system keyword state</a></li>
+       <li><a href=#before-doctype-system-identifier-state><span class=secno>9.2.4.63 </span>Before DOCTYPE system identifier state</a></li>
+       <li><a href=#doctype-system-identifier-(double-quoted)-state><span class=secno>9.2.4.64 </span>DOCTYPE system identifier (double-quoted) state</a></li>
+       <li><a href=#doctype-system-identifier-(single-quoted)-state><span class=secno>9.2.4.65 </span>DOCTYPE system identifier (single-quoted) state</a></li>
+       <li><a href=#after-doctype-system-identifier-state><span class=secno>9.2.4.66 </span>After DOCTYPE system identifier state</a></li>
+       <li><a href=#bogus-doctype-state><span class=secno>9.2.4.67 </span>Bogus DOCTYPE state</a></li>
+       <li><a href=#cdata-section-state><span class=secno>9.2.4.68 </span>CDATA section state</a></li>
+       <li><a href=#tokenizing-character-references><span class=secno>9.2.4.69 </span>Tokenizing character references</a></ol></li>
      <li><a href=#tree-construction><span class=secno>9.2.5 </span>Tree construction</a>
       <ol>
        <li><a href=#creating-and-inserting-elements><span class=secno>9.2.5.1 </span>Creating and inserting elements</a></li>
@@ -12022,10 +12032,12 @@
    <dd>Where <a href=#phrasing-content>phrasing content</a> is expected.</dd>
    <dt>Content model:</dt>
    <dd>If there is no <code title=attr-script-src><a href=#attr-script-src>src</a></code>
-   attribute, depends on the value of the <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute.</dd>
+   attribute, depends on the value of the <code title=attr-script-type><a href=#attr-script-type>type</a></code> attribute, but must match
+   <a href=#restrictions-for-contents-of-script-elements>script content restrictions</a>.</dd>
    <dd>If there <em>is</em> a <code title=attr-script-src><a href=#attr-script-src>src</a></code>
    attribute, the element must be either empty or contain only
-   <a href=#inline-documentation-for-external-scripts>script documentation</a>.</dd>
+   <a href=#inline-documentation-for-external-scripts>script documentation</a> that also matches <a href=#restrictions-for-contents-of-script-elements>script
+   content restrictions</a>.</dd>
    <dt>Content attributes:</dt>
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dd><code title=attr-script-src><a href=#attr-script-src>src</a></code></dd>
@@ -12633,8 +12645,59 @@
   </div>
 
 
-  <h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.2 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
+  <h5 id=restrictions-for-contents-of-script-elements><span class=secno>4.3.1.2 </span><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
 
+  <p>The contents of a <code><a href=#script>script</a></code> element must match the
+  <code title="">script</code> production in the following ABNF, the
+  character set for which is Unicode. <a href=#refsABNF>[ABNF]</a></p>
+
+  <pre>script        = body1
+
+body1         = *( text1 / body2 )
+body2         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
+body3         = script-start *text3
+
+script-start  = lt       s c r i p t tag-end
+script-end    = lt slash s c r i p t tag-end
+
+text1         = <anything that doesn't match not-text1>
+text2         = <anything that doesn't match not-text2>
+text3         = <anything that doesn't match not-text3>
+
+not-text1     = "<!--" / script-end
+not-text2     = script-start / script-end / "-->"
+not-text3     = script-end / "-->"
+
+lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
+slash         =  %x002F ; U+002F SOLIDUS character (/)
+
+s             =  %x0053 ; U+0053 LATIN CAPITAL LETTER S
+s             =/ %x0073 ; U+0073 LATIN SMALL LETTER S
+c             =  %x0043 ; U+0043 LATIN CAPITAL LETTER C
+c             =/ %x0063 ; U+0063 LATIN SMALL LETTER C
+r             =  %x0052 ; U+0052 LATIN CAPITAL LETTER R
+r             =/ %x0072 ; U+0072 LATIN SMALL LETTER R
+i             =  %x0049 ; U+0049 LATIN CAPITAL LETTER I
+i             =/ %x0069 ; U+0069 LATIN SMALL LETTER I
+p             =  %x0050 ; U+0050 LATIN CAPITAL LETTER P
+p             =/ %x0070 ; U+0070 LATIN SMALL LETTER P
+t             =  %x0054 ; U+0054 LATIN CAPITAL LETTER T
+t             =/ %x0074 ; U+0074 LATIN SMALL LETTER T
+
+tag-end       =  %x0009 ; U+0009 CHARACTER TABULATION
+tag-end       =/ %x000A ; U+000A LINE FEED (LF)
+tag-end       =/ %x000C ; U+000C FORM FEED (FF)
+tag-end       =/ %x0020 ; U+0020 SPACE
+tag-end       =/ %x002F ; U+002F SOLIDUS (/)
+tag-end       =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
+
+  <p>When a <code><a href=#script>script</a></code> element contains <a href=#inline-documentation-for-external-scripts>script
+  documentation</a>, there are further restrictions on the contents
+  of the element, as described in the section below.</p>
+
+
+  <h5 id=inline-documentation-for-external-scripts><span class=secno>4.3.1.3 </span><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
+
   <p>If a <code><a href=#script>script</a></code> element's <code title=attr-script-src><a href=#attr-script-src>src</a></code> attribute is specified, then the
   contents of the <code><a href=#script>script</a></code> element, if any, must be such
   that the value of the DOM <code title=dom-script-text><a href=#dom-script-text>text</a></code>
@@ -12662,6 +12725,10 @@
   <p class=note>This corresponds to putting the contents of the
   element in JavaScript comments.</p>
 
+  <p class=note>This requirement is in addition to the earlier
+  restrictiosn on the syntax of contents of <code><a href=#script>script</a></code>
+  elements.</p>
+
   <div class=example>
 
    <p>This allows authors to include documentation, such as license
@@ -60006,41 +60073,9 @@
   case-insensitively match the tag name of the element followed by one
   of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM
   FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E
-  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that string is
-  part of an <a href=#syntax-escape title=syntax-escape>escaping text
-  span</a>.</p>
+  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/).</p>
 
-  <p>An <dfn id=syntax-escape title=syntax-escape>escaping text span</dfn> is a span
-  of <a href=#syntax-text title=syntax-text>text</a> that starts with an <a href=#syntax-escape-start title=syntax-escape-start>escaping text span start</a> that is
-  not itself in an <a href=#syntax-escape title=syntax-escape>escaping text
-  span</a>, and ends at the next <a href=#syntax-escape-end title=syntax-escape-end>escaping text span end</a>. There
-  cannot be any <a href=#syntax-charref title=syntax-charref>character
-  references</a> inside an <a href=#syntax-escape title=syntax-escape>escaping
-  text span</a> — sequences of characters that would look
-  like <a href=#syntax-charref title=syntax-charref>character references</a> do not
-  have special meaning.</p>
 
-  <p>An <dfn id=syntax-escape-start title=syntax-escape-start>escaping text span
-  start</dfn> is a part of <a href=#syntax-text title=syntax-text>text</a> that
-  consists of the four character sequence "<code title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
-  MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</p>
-
-  <p>An <dfn id=syntax-escape-end title=syntax-escape-end>escaping text span end</dfn> is
-  a part of <a href=#syntax-text title=syntax-text>text</a> that consists of the
-  three character sequence "<code title="">--></code>" (U+002D
-  HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</p>
-
-  <p>An <a href=#syntax-escape-start title=syntax-escape-start>escaping text span
-  start</a> may share its U+002D HYPHEN-MINUS characters with its
-  corresponding <a href=#syntax-escape-end title=syntax-escape-end>escaping text span
-  end</a>.</p>
-
-  <p>The text in <a href=#raw-text-elements>raw text elements</a> and <a href=#rcdata-elements>RCDATA
-  elements</a> must not have an <a href=#syntax-escape-start title=syntax-escape-start>escaping text span start</a> that is
-  not followed by an <a href=#syntax-escape-end title=syntax-escape-end>escaping text
-  span end</a>.</p>
-
-
   <h4 id=text-0><span class=secno>9.1.3 </span>Text</h4>
 
   <p><dfn id=syntax-text title=syntax-text>Text</dfn> is allowed inside elements,
@@ -61939,13 +61974,13 @@
    character</a> (add 0x0020 to the character's code point) to the
    current tag token's tag name. Append the <a href=#current-input-character>current input
    character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
-   <a href=#script-data-end-tag-name-state>Script data end tag name state</a>.</dd>
+   <a href=#script-data-end-tag-name-state>script data end tag name state</a>.</dd>
 
    <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
    <dd>Append the <a href=#current-input-character>current input character</a> to the current
    tag token's tag name. Append the <a href=#current-input-character>current input
    character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
-   <a href=#script-data-end-tag-name-state>Script data end tag name state</a>.</dd>
+   <a href=#script-data-end-tag-name-state>script data end tag name state</a>.</dd>
 
    <dt>Anything else</dt>
    <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
@@ -61986,13 +62021,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <a href=#script-data-escaped-dash-state>script data escaped dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>EOF</dt>
    <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Stay in
-   the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Stay in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
   </dl><h5 id=script-data-escaped-dash-state><span class=secno>9.2.4.22 </span><dfn>Script data escaped dash state</dfn></h5>
 
@@ -62002,13 +62041,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <a href=#script-data-escaped-dash-dash-state>script data escaped dash dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>EOF</dt>
    <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
   </dl><h5 id=script-data-escaped-dash-dash-state><span class=secno>9.2.4.23 </span><dfn>Script data escaped dash dash state</dfn></h5>
 
@@ -62018,6 +62061,10 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
    <a href=#script-data-escaped-dash-dash-state>script data escaped dash dash state</a>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <a href=#script-data-escaped-less-than-sign-state>script data escaped less-than sign
+   state</a>.</dd>
+
    <dt>U+003E GREATER-THAN SIGN (>)</dt>
    <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
    <a href=#script-data-state>script data state</a>.</dd>
@@ -62027,18 +62074,269 @@
    <a href=#data-state>data state</a>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
 
-  </dl><h5 id=before-attribute-name-state><span class=secno>9.2.4.24 </span><dfn>Before attribute name state</dfn></h5>
+  </dl><h5 id=script-data-escaped-less-than-sign-state><span class=secno>9.2.4.24 </span><dfn>Script data escaped less-than sign state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
+  <dl class=switch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Switch
+   to the <a href=#script-data-escaped-end-tag-open-state>script data escaped end tag open state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <a href=#current-input-character>current input character</a> as a character token. Set the
+   <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the
+   lowercase version of the <a href=#current-input-character>current input character</a> (add
+   0x0020 to the character's code point) to the <var><a href=#temporary-buffer>temporary
+   buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state>script data double escape start
+   state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <a href=#current-input-character>current input character</a> as a character token. Set the
+   <var><a href=#temporary-buffer>temporary buffer</a></var> to the empty string. Append the
+   <a href=#current-input-character>current input character</a> to the <var><a href=#temporary-buffer>temporary
+   buffer</a></var>. Switch to the <a href=#script-data-double-escape-start-state>script data double escape start
+   state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and reconsume the
+   <a href=#current-input-character>current input character</a> in the <a href=#script-data-escaped-state>script data
+   escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-escaped-end-tag-open-state><span class=secno>9.2.4.25 </span><dfn>Script data escaped end tag open state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   lowercase version of the <a href=#current-input-character>current input character</a> (add
+   0x0020 to the character's code point). Append the <a href=#current-input-character>current
+   input character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Finally,
+   switch to the <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name
+   state</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   <a href=#current-input-character>current input character</a>. Append the <a href=#current-input-character>current
+   input character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Finally,
+   switch to the <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name
+   state</a>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, and reconsume the <a href=#current-input-character>current input
+   character</a> in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-escaped-end-tag-name-state><span class=secno>9.2.4.26 </span><dfn>Script data escaped end tag name state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
   <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
    <dt>U+000A LINE FEED (LF)</dt>
    <dt>U+000C FORM FEED (FF)</dt>
    <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
    <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then switch to the <a href=#before-attribute-name-state>before attribute name
+   state</a>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then switch to the <a href=#self-closing-start-tag-state>self-closing start tag
+   state</a>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <a href=#appropriate-end-tag-token>appropriate end tag
+   token</a>, then emit the current tag token and switch to the
+   <a href=#data-state>data state</a>. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   current tag token's tag name. Append the <a href=#current-input-character>current input
+   character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
+   <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Append the <a href=#current-input-character>current input character</a> to the current
+   tag token's tag name. Append the <a href=#current-input-character>current input
+   character</a> to the <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the
+   <a href=#script-data-escaped-end-tag-name-state>script data escaped end tag name state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, a character token for each of the characters in
+   the <var><a href=#temporary-buffer>temporary buffer</a></var> (in the order they were added to
+   the buffer), and reconsume the <a href=#current-input-character>current input character</a>
+   in the <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escape-start-state><span class=secno>9.2.4.27 </span><dfn>Script data double escape start state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. If the <var><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code title="">script</code>", then switch to the <a href=#script-data-double-escaped-state>script data
+   double escaped state</a>. Otherwise, switch to the <a href=#script-data-escaped-state>script
+   data escaped state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-start-state>script data double
+   escape start state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the <a href=#current-input-character>current input character</a> to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-start-state>script data double
+   escape start state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-escaped-state>script data escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-state><span class=secno>9.2.4.28 </span><dfn>Script data double escaped state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <a href=#script-data-double-escaped-dash-state>script data double escaped dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Stay in the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-dash-state><span class=secno>9.2.4.29 </span><dfn>Script data double escaped dash state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <a href=#script-data-double-escaped-dash-dash-state>script data double escaped dash dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-dash-dash-state><span class=secno>9.2.4.30 </span><dfn>Script data double escaped dash dash state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
+   <a href=#script-data-double-escaped-dash-dash-state>script data double escaped dash dash state</a>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <a href=#script-data-double-escaped-less-than-sign-state>script data double escaped less-than sign
+   state</a>.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
+   <a href=#script-data-state>script data state</a>.</dd>
+
+   <dt>EOF</dt>
+   <dd><a href=#parse-error>Parse error</a>. Reconsume the EOF character in the
+   <a href=#data-state>data state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Switch to the <a href=#script-data-double-escaped-state>script data double escaped
+   state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escaped-less-than-sign-state><span class=secno>9.2.4.31 </span><dfn>Script data double escaped less-than sign state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+002F SOLIDUS (/)</dt>
+   <dd>Emit a U+002F SOLIDUS character token. Set the <var><a href=#temporary-buffer>temporary
+   buffer</a></var> to the empty string. Switch to the <a href=#script-data-double-escape-end-state>script data
+   double escape end state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-double-escaped-state>script data double escaped state</a>.</dd>
+
+  </dl><h5 id=script-data-double-escape-end-state><span class=secno>9.2.4.32 </span><dfn>Script data double escape end state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. If the <var><a href=#temporary-buffer>temporary buffer</a></var> is the string "<code title="">script</code>", then switch to the <a href=#script-data-escaped-state>script data
+   escaped state</a>. Otherwise, switch to the <a href=#script-data-double-escaped-state>script data
+   double escaped state</a>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the lowercase version of the <a href=#current-input-character>current input
+   character</a> (add 0x0020 to the character's code point) to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-end-state>script data double
+   escape end state</a>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <a href=#current-input-character>current input character</a> as a character
+   token. Append the <a href=#current-input-character>current input character</a> to the
+   <var><a href=#temporary-buffer>temporary buffer</a></var>. Stay in the <a href=#script-data-double-escape-end-state>script data double
+   escape end state</a>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <a href=#current-input-character>current input character</a> in the
+   <a href=#script-data-double-escaped-state>script data double escaped state</a>.</dd>
+
+  </dl><h5 id=before-attribute-name-state><span class=secno>9.2.4.33 </span><dfn>Before attribute name state</dfn></h5>
+
+  <p>Consume the <a href=#next-input-character>next input character</a>:</p>
+
+  <dl class=switch><dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
    <dd>Stay in the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
    <dt>U+002F SOLIDUS (/)</dt>
@@ -62072,7 +62370,7 @@
    the empty string. Switch to the <a href=#attribute-name-state>attribute name
    state</a>.</dd>
 
-  </dl><h5 id=attribute-name-state><span class=secno>9.2.4.25 </span><dfn>Attribute name state</dfn></h5>
+  </dl><h5 id=attribute-name-state><span class=secno>9.2.4.34 </span><dfn>Attribute name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62123,7 +62421,7 @@
   associated with it (if any).</p>
 
 
-  <h5 id=after-attribute-name-state><span class=secno>9.2.4.26 </span><dfn>After attribute name state</dfn></h5>
+  <h5 id=after-attribute-name-state><span class=secno>9.2.4.35 </span><dfn>After attribute name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62167,7 +62465,7 @@
    its value to the empty string. Switch to the <a href=#attribute-name-state>attribute name
    state</a>.</dd>
 
-  </dl><h5 id=before-attribute-value-state><span class=secno>9.2.4.27 </span><dfn>Before attribute value state</dfn></h5>
+  </dl><h5 id=before-attribute-value-state><span class=secno>9.2.4.36 </span><dfn>Before attribute value state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62207,7 +62505,7 @@
    attribute's value. Switch to the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
    state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(double-quoted)-state><span class=secno>9.2.4.28 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(double-quoted)-state><span class=secno>9.2.4.37 </span><dfn>Attribute value (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62229,7 +62527,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(double-quoted)-state>attribute value
    (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(single-quoted)-state><span class=secno>9.2.4.29 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(single-quoted)-state><span class=secno>9.2.4.38 </span><dfn>Attribute value (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62251,7 +62549,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(single-quoted)-state>attribute value
    (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=attribute-value-(unquoted)-state><span class=secno>9.2.4.30 </span><dfn>Attribute value (unquoted) state</dfn></h5>
+  </dl><h5 id=attribute-value-(unquoted)-state><span class=secno>9.2.4.39 </span><dfn>Attribute value (unquoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62288,7 +62586,7 @@
    attribute's value. Stay in the <a href=#attribute-value-(unquoted)-state>attribute value (unquoted)
    state</a>.</dd>
 
-  </dl><h5 id=character-reference-in-attribute-value-state><span class=secno>9.2.4.31 </span><dfn>Character reference in attribute value state</dfn></h5>
+  </dl><h5 id=character-reference-in-attribute-value-state><span class=secno>9.2.4.40 </span><dfn>Character reference in attribute value state</dfn></h5>
 
   <p>Attempt to <a href=#consume-a-character-reference>consume a character reference</a>.</p>
 
@@ -62302,7 +62600,7 @@
   in when were switched into this state.</p>
 
 
-  <h5 id=after-attribute-value-(quoted)-state><span class=secno>9.2.4.32 </span><dfn>After attribute value (quoted) state</dfn></h5>
+  <h5 id=after-attribute-value-(quoted)-state><span class=secno>9.2.4.41 </span><dfn>After attribute value (quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62328,7 +62626,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the character in
    the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
-  </dl><h5 id=self-closing-start-tag-state><span class=secno>9.2.4.33 </span><dfn>Self-closing start tag state</dfn></h5>
+  </dl><h5 id=self-closing-start-tag-state><span class=secno>9.2.4.42 </span><dfn>Self-closing start tag state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62345,7 +62643,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the character in
    the <a href=#before-attribute-name-state>before attribute name state</a>.</dd>
 
-  </dl><h5 id=bogus-comment-state><span class=secno>9.2.4.34 </span><dfn>Bogus comment state</dfn></h5>
+  </dl><h5 id=bogus-comment-state><span class=secno>9.2.4.43 </span><dfn>Bogus comment state</dfn></h5>
 
   <p>Consume every character up to and including the first U+003E
   GREATER-THAN SIGN character (>) or the end of the file (EOF),
@@ -62363,7 +62661,7 @@
   character.</p>
 
 
-  <h5 id=markup-declaration-open-state><span class=secno>9.2.4.35 </span><dfn>Markup declaration open state</dfn></h5>
+  <h5 id=markup-declaration-open-state><span class=secno>9.2.4.44 </span><dfn>Markup declaration open state</dfn></h5>
 
   <p>If the next two characters are both U+002D HYPHEN-MINUS (-)
   characters, consume those two characters, create a comment token
@@ -62388,7 +62686,7 @@
   comment.</p>
 
 
-  <h5 id=comment-start-state><span class=secno>9.2.4.36 </span><dfn>Comment start state</dfn></h5>
+  <h5 id=comment-start-state><span class=secno>9.2.4.45 </span><dfn>Comment start state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62408,7 +62706,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment
    token's data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-start-dash-state><span class=secno>9.2.4.37 </span><dfn>Comment start dash state</dfn></h5>
+  </dl><h5 id=comment-start-dash-state><span class=secno>9.2.4.46 </span><dfn>Comment start dash state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62429,7 +62727,7 @@
    <a href=#current-input-character>current input character</a> to the comment token's
    data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-state><span class=secno>9.2.4.38 </span><dfn id=comment>Comment state</dfn></h5>
+  </dl><h5 id=comment-state><span class=secno>9.2.4.47 </span><dfn id=comment>Comment state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62445,7 +62743,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment
    token's data. Stay in the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-dash-state><span class=secno>9.2.4.39 </span><dfn>Comment end dash state</dfn></h5>
+  </dl><h5 id=comment-end-dash-state><span class=secno>9.2.4.48 </span><dfn>Comment end dash state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62462,7 +62760,7 @@
    <a href=#current-input-character>current input character</a> to the comment token's
    data. Switch to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-state><span class=secno>9.2.4.40 </span><dfn>Comment end state</dfn></h5>
+  </dl><h5 id=comment-end-state><span class=secno>9.2.4.49 </span><dfn>Comment end state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62503,7 +62801,7 @@
    comment token's data. Switch to the <a href=#comment-state>comment
    state</a>.</dd>
 
-  </dl><h5 id=comment-end-bang-state><span class=secno>9.2.4.41 </span><dfn>Comment end bang state</dfn></h5>
+  </dl><h5 id=comment-end-bang-state><span class=secno>9.2.4.50 </span><dfn>Comment end bang state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62527,7 +62825,7 @@
    character</a> to the comment token's data. Switch to the
    <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=comment-end-space-state><span class=secno>9.2.4.42 </span><dfn>Comment end space state</dfn></h5>
+  </dl><h5 id=comment-end-space-state><span class=secno>9.2.4.51 </span><dfn>Comment end space state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62555,7 +62853,7 @@
    <dd>Append the <a href=#current-input-character>current input character</a> to the comment token's data. Switch
    to the <a href=#comment-state>comment state</a>.</dd>
 
-  </dl><h5 id=doctype-state><span class=secno>9.2.4.43 </span><dfn>DOCTYPE state</dfn></h5>
+  </dl><h5 id=doctype-state><span class=secno>9.2.4.52 </span><dfn>DOCTYPE state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62575,7 +62873,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current
    character in the <a href=#before-doctype-name-state>before DOCTYPE name state</a>.</dd>
 
-  </dl><h5 id=before-doctype-name-state><span class=secno>9.2.4.44 </span><dfn>Before DOCTYPE name state</dfn></h5>
+  </dl><h5 id=before-doctype-name-state><span class=secno>9.2.4.53 </span><dfn>Before DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62607,7 +62905,7 @@
    <a href=#current-input-character>current input character</a>. Switch to the <a href=#doctype-name-state>DOCTYPE name
    state</a>.</dd>
 
-  </dl><h5 id=doctype-name-state><span class=secno>9.2.4.45 </span><dfn>DOCTYPE name state</dfn></h5>
+  </dl><h5 id=doctype-name-state><span class=secno>9.2.4.54 </span><dfn>DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62638,7 +62936,7 @@
    DOCTYPE token's name. Stay in the <a href=#doctype-name-state>DOCTYPE name
    state</a>.</dd>
 
-  </dl><h5 id=after-doctype-name-state><span class=secno>9.2.4.46 </span><dfn>After DOCTYPE name state</dfn></h5>
+  </dl><h5 id=after-doctype-name-state><span class=secno>9.2.4.55 </span><dfn>After DOCTYPE name state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62678,7 +62976,7 @@
 
    </dd>
 
-  </dl><h5 id=after-doctype-public-keyword-state><span class=secno>9.2.4.47 </span><dfn>After DOCTYPE public keyword state</dfn></h5>
+  </dl><h5 id=after-doctype-public-keyword-state><span class=secno>9.2.4.56 </span><dfn>After DOCTYPE public keyword state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62699,7 +62997,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current character in
    the <a href=#before-doctype-public-identifier-state>before DOCTYPE public identifier state</a>.</dd>
 
-  </dl><h5 id=before-doctype-public-identifier-state><span class=secno>9.2.4.48 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
+  </dl><h5 id=before-doctype-public-identifier-state><span class=secno>9.2.4.57 </span><dfn>Before DOCTYPE public identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62735,7 +63033,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>9.2.4.49 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-public-identifier-(double-quoted)-state><span class=secno>9.2.4.58 </span><dfn>DOCTYPE public identifier (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62757,7 +63055,7 @@
    token's public identifier. Stay in the <a href=#doctype-public-identifier-(double-quoted)-state>DOCTYPE public
    identifier (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>9.2.4.50 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-public-identifier-(single-quoted)-state><span class=secno>9.2.4.59 </span><dfn>DOCTYPE public identifier (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62779,7 +63077,7 @@
    token's public identifier. Stay in the <a href=#doctype-public-identifier-(single-quoted)-state>DOCTYPE public
    identifier (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=after-doctype-public-identifier-state><span class=secno>9.2.4.51 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
+  </dl><h5 id=after-doctype-public-identifier-state><span class=secno>9.2.4.60 </span><dfn>After DOCTYPE public identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62815,7 +63113,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>9.2.4.52 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
+  </dl><h5 id=between-doctype-public-and-system-identifiers-state><span class=secno>9.2.4.61 </span><dfn>Between DOCTYPE public and system identifiers state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62851,7 +63149,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=after-doctype-system-keyword-state><span class=secno>9.2.4.53 </span><dfn>After DOCTYPE system keyword state</dfn></h5>
+  </dl><h5 id=after-doctype-system-keyword-state><span class=secno>9.2.4.62 </span><dfn>After DOCTYPE system keyword state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62872,7 +63170,7 @@
    <dd><a href=#parse-error>Parse error</a>. Reconsume the current character in
    the <a href=#before-doctype-system-identifier-state>before DOCTYPE system identifier state</a>.</dd>
 
-  </dl><h5 id=before-doctype-system-identifier-state><span class=secno>9.2.4.54 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
+  </dl><h5 id=before-doctype-system-identifier-state><span class=secno>9.2.4.63 </span><dfn>Before DOCTYPE system identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62908,7 +63206,7 @@
    <i>force-quirks flag</i> to <i>on</i>. Switch to the <a href=#bogus-doctype-state>bogus
    DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>9.2.4.55 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-system-identifier-(double-quoted)-state><span class=secno>9.2.4.64 </span><dfn>DOCTYPE system identifier (double-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62931,7 +63229,7 @@
    DOCTYPE token's system identifier. Stay in the <a href=#doctype-system-identifier-(double-quoted)-state>DOCTYPE system
    identifier (double-quoted) state</a>.</dd>
 
-  </dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>9.2.4.56 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
+  </dl><h5 id=doctype-system-identifier-(single-quoted)-state><span class=secno>9.2.4.65 </span><dfn>DOCTYPE system identifier (single-quoted) state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62954,7 +63252,7 @@
    DOCTYPE token's system identifier. Stay in the <a href=#doctype-system-identifier-(single-quoted)-state>DOCTYPE system
    identifier (single-quoted) state</a>.</dd>
 
-  </dl><h5 id=after-doctype-system-identifier-state><span class=secno>9.2.4.57 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
+  </dl><h5 id=after-doctype-system-identifier-state><span class=secno>9.2.4.66 </span><dfn>After DOCTYPE system identifier state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62980,7 +63278,7 @@
    state</a>. (This does <em>not</em> set the DOCTYPE token's
    <i>force-quirks flag</i> to <i>on</i>.)</dd>
 
-  </dl><h5 id=bogus-doctype-state><span class=secno>9.2.4.58 </span><dfn>Bogus DOCTYPE state</dfn></h5>
+  </dl><h5 id=bogus-doctype-state><span class=secno>9.2.4.67 </span><dfn>Bogus DOCTYPE state</dfn></h5>
 
   <p>Consume the <a href=#next-input-character>next input character</a>:</p>
 
@@ -62995,7 +63293,7 @@
    <dt>Anything else</dt>
    <dd>Stay in the <a href=#bogus-doctype-state>bogus DOCTYPE state</a>.</dd>
 
-  </dl><h5 id=cdata-section-state><span class=secno>9.2.4.59 </span><dfn>CDATA section state</dfn></h5>
+  </dl><h5 id=cdata-section-state><span class=secno>9.2.4.68 </span><dfn>CDATA section state</dfn></h5>
 
   <p>Consume every character up to the next occurrence of the three
   character sequence U+005D RIGHT SQUARE BRACKET U+005D RIGHT SQUARE
@@ -63012,7 +63310,7 @@
 
 
 
-  <h5 id=tokenizing-character-references><span class=secno>9.2.4.60 </span>Tokenizing character references</h5>
+  <h5 id=tokenizing-character-references><span class=secno>9.2.4.69 </span>Tokenizing character references</h5>
 
   <p>This section defines how to <dfn id=consume-a-character-reference>consume a character
   reference</dfn>. This definition is used when parsing character

Modified: source
===================================================================
--- source	2009-10-19 11:00:31 UTC (rev 4177)
+++ source	2009-10-20 00:32:01 UTC (rev 4178)
@@ -12701,10 +12701,12 @@
    <dt>Content model:</dt>
    <dd>If there is no <code title="attr-script-src">src</code>
    attribute, depends on the value of the <code
-   title="attr-script-type">type</code> attribute.</dd>
+   title="attr-script-type">type</code> attribute, but must match
+   <span>script content restrictions</span>.</dd>
    <dd>If there <em>is</em> a <code title="attr-script-src">src</code>
    attribute, the element must be either empty or contain only
-   <span>script documentation</span>.</dd>
+   <span>script documentation</span> that also matches <span>script
+   content restrictions</span>.</dd>
    <dt>Content attributes:</dt>
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-script-src">src</code></dd>
@@ -13416,6 +13418,58 @@
   </div>
 
 
+  <h5><dfn title="script content restrictions">Restrictions for contents of <code>script</code> elements</dfn></h5>
+
+  <p>The contents of a <code>script</code> element must match the
+  <code title="">script</code> production in the following ABNF, the
+  character set for which is Unicode. <a
+  href="#refsABNF">[ABNF]</a></p>
+
+  <pre>script        = body1
+
+body1         = *( text1 / body2 )
+body2         = "<!--" *( text2 / body3 script-end ) [ body3 ] "-->"
+body3         = script-start *text3
+
+script-start  = lt       s c r i p t tag-end
+script-end    = lt slash s c r i p t tag-end
+
+text1         = <anything that doesn't match not-text1>
+text2         = <anything that doesn't match not-text2>
+text3         = <anything that doesn't match not-text3>
+
+not-text1     = "<!--" / script-end
+not-text2     = script-start / script-end / "-->"
+not-text3     = script-end / "-->"
+
+lt            =  %x003C ; U+003C LESS-THAN SIGN character (<)
+slash         =  %x002F ; U+002F SOLIDUS character (/)
+
+s             =  %x0053 ; U+0053 LATIN CAPITAL LETTER S
+s             =/ %x0073 ; U+0073 LATIN SMALL LETTER S
+c             =  %x0043 ; U+0043 LATIN CAPITAL LETTER C
+c             =/ %x0063 ; U+0063 LATIN SMALL LETTER C
+r             =  %x0052 ; U+0052 LATIN CAPITAL LETTER R
+r             =/ %x0072 ; U+0072 LATIN SMALL LETTER R
+i             =  %x0049 ; U+0049 LATIN CAPITAL LETTER I
+i             =/ %x0069 ; U+0069 LATIN SMALL LETTER I
+p             =  %x0050 ; U+0050 LATIN CAPITAL LETTER P
+p             =/ %x0070 ; U+0070 LATIN SMALL LETTER P
+t             =  %x0054 ; U+0054 LATIN CAPITAL LETTER T
+t             =/ %x0074 ; U+0074 LATIN SMALL LETTER T
+
+tag-end       =  %x0009 ; U+0009 CHARACTER TABULATION
+tag-end       =/ %x000A ; U+000A LINE FEED (LF)
+tag-end       =/ %x000C ; U+000C FORM FEED (FF)
+tag-end       =/ %x0020 ; U+0020 SPACE
+tag-end       =/ %x002F ; U+002F SOLIDUS (/)
+tag-end       =/ %x003E ; U+003E GREATER-THAN SIGN (>)</pre>
+
+  <p>When a <code>script</code> element contains <span>script
+  documentation</span>, there are further restrictions on the contents
+  of the element, as described in the section below.</p>
+
+
   <h5><dfn title="script documentation">Inline documentation for external scripts</dfn></h5>
 
   <p>If a <code>script</code> element's <code
@@ -13447,6 +13501,10 @@
   <p class="note">This corresponds to putting the contents of the
   element in JavaScript comments.</p>
 
+  <p class="note">This requirement is in addition to the earlier
+  restrictiosn on the syntax of contents of <code>script</code>
+  elements.</p>
+
   <div class="example">
 
    <p>This allows authors to include documentation, such as license
@@ -77549,45 +77607,9 @@
   case-insensitively match the tag name of the element followed by one
   of U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM
   FEED (FF), U+000D CARRIAGE RETURN (CR), U+0020 SPACE, U+003E
-  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/), unless that string is
-  part of an <span title="syntax-escape">escaping text
-  span</span>.</p>
+  GREATER-THAN SIGN (>), or U+002F SOLIDUS (/).</p>
 
-  <p>An <dfn title="syntax-escape">escaping text span</dfn> is a span
-  of <span title="syntax-text">text</span> that starts with an <span
-  title="syntax-escape-start">escaping text span start</span> that is
-  not itself in an <span title="syntax-escape">escaping text
-  span</span>, and ends at the next <span
-  title="syntax-escape-end">escaping text span end</span>. There
-  cannot be any <span title="syntax-charref">character
-  references</span> inside an <span title="syntax-escape">escaping
-  text span</span> — sequences of characters that would look
-  like <span title="syntax-charref">character references</span> do not
-  have special meaning.</p>
 
-  <p>An <dfn title="syntax-escape-start">escaping text span
-  start</dfn> is a part of <span title="syntax-text">text</span> that
-  consists of the four character sequence "<code
-  title=""><!--</code>" (U+003C LESS-THAN SIGN, U+0021 EXCLAMATION
-  MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS).</p>
-
-  <p>An <dfn title="syntax-escape-end">escaping text span end</dfn> is
-  a part of <span title="syntax-text">text</span> that consists of the
-  three character sequence "<code title="">--></code>" (U+002D
-  HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).</p>
-
-  <p>An <span title="syntax-escape-start">escaping text span
-  start</span> may share its U+002D HYPHEN-MINUS characters with its
-  corresponding <span title="syntax-escape-end">escaping text span
-  end</span>.</p>
-
-  <p>The text in <span>raw text elements</span> and <span>RCDATA
-  elements</span> must not have an <span
-  title="syntax-escape-start">escaping text span start</span> that is
-  not followed by an <span title="syntax-escape-end">escaping text
-  span end</span>.</p>
-
-
   <h4>Text</h4>
 
   <p><dfn title="syntax-text">Text</dfn> is allowed inside elements,
@@ -79793,13 +79815,13 @@
    character</span> (add 0x0020 to the character's code point) to the
    current tag token's tag name. Append the <span>current input
    character</span> to the <var>temporary buffer</var>. Stay in the
-   <span>Script data end tag name state</span>.</dd>
+   <span>script data end tag name state</span>.</dd>
 
    <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
    <dd>Append the <span>current input character</span> to the current
    tag token's tag name. Append the <span>current input
    character</span> to the <var>temporary buffer</var>. Stay in the
-   <span>Script data end tag name state</span>.</dd>
+   <span>script data end tag name state</span>.</dd>
 
    <dt>Anything else</dt>
    <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
@@ -79855,13 +79877,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <span>script data escaped dash state</span>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <span>script data escaped less-than sign
+   state</span>.</p></dd>
+
    <dt>EOF</dt>
    <dd><span>Parse error</span>. Reconsume the EOF character in the
    <span>data state</span>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Stay in
-   the <span>script data escaped state</span>.</dd>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Stay in the <span>script data escaped state</span>.</dd>
 
   </dl>
 
@@ -79876,13 +79902,17 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
    <span>script data escaped dash dash state</span>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <span>script data escaped less-than sign
+   state</span>.</p></dd>
+
    <dt>EOF</dt>
    <dd><span>Parse error</span>. Reconsume the EOF character in the
    <span>data state</span>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <span>script data escaped state</span>.</dd>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Switch to the <span>script data escaped state</span>.</dd>
 
   </dl>
 
@@ -79897,6 +79927,10 @@
    <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
    <span>script data escaped dash dash state</span>.</dd>
 
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Switch to the <span>script data escaped less-than sign
+   state</span>.</p></dd>
+
    <dt>U+003E GREATER-THAN SIGN (>)</dt>
    <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
    <span>script data state</span>.</dd>
@@ -79906,12 +79940,310 @@
    <span>data state</span>.</dd>
 
    <dt>Anything else</dt>
-   <dd>Emit the current input character as a character token. Switch
-   to the <span>script data escaped state</span>.</dd>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Switch to the <span>script data escaped state</span>.</dd>
 
   </dl>
 
 
+  <h5><dfn>Script data escaped less-than sign state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Set the <var>temporary buffer</var> to the empty string. Switch
+   to the <span>script data escaped end tag open state</span>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <span>current input character</span> as a character token. Set the
+   <var>temporary buffer</var> to the empty string. Append the
+   lowercase version of the <span>current input character</span> (add
+   0x0020 to the character's code point) to the <var>temporary
+   buffer</var>. Switch to the <span>script data double escape start
+   state</span>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and the
+   <span>current input character</span> as a character token. Set the
+   <var>temporary buffer</var> to the empty string. Append the
+   <span>current input character</span> to the <var>temporary
+   buffer</var>. Switch to the <span>script data double escape start
+   state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token and reconsume the
+   <span>current input character</span> in the <span>script data
+   escaped state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data escaped end tag open state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   lowercase version of the <span>current input character</span> (add
+   0x0020 to the character's code point). Append the <span>current
+   input character</span> to the <var>temporary buffer</var>. Finally,
+   switch to the <span>script data escaped end tag name
+   state</span>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Create a new end tag token, and set its tag name to the
+   <span>current input character</span>. Append the <span>current
+   input character</span> to the <var>temporary buffer</var>. Finally,
+   switch to the <span>script data escaped end tag name
+   state</span>. (Don't emit the token yet; further details will be
+   filled in before it is emitted.)</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, and reconsume the <span>current input
+   character</span> in the <span>script data escaped state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data escaped end tag name state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dd>If the current end tag token is an <span>appropriate end tag
+   token</span>, then switch to the <span>before attribute name
+   state</span>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>If the current end tag token is an <span>appropriate end tag
+   token</span>, then switch to the <span>self-closing start tag
+   state</span>. Otherwise, treat it as per the "anything else" entry
+   below.</dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>If the current end tag token is an <span>appropriate end tag
+   token</span>, then emit the current tag token and switch to the
+   <span>data state</span>. Otherwise, treat it as per the "anything
+   else" entry below.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Append the lowercase version of the <span>current input
+   character</span> (add 0x0020 to the character's code point) to the
+   current tag token's tag name. Append the <span>current input
+   character</span> to the <var>temporary buffer</var>. Stay in the
+   <span>script data escaped end tag name state</span>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Append the <span>current input character</span> to the current
+   tag token's tag name. Append the <span>current input
+   character</span> to the <var>temporary buffer</var>. Stay in the
+   <span>script data escaped end tag name state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
+   character token, a character token for each of the characters in
+   the <var>temporary buffer</var> (in the order they were added to
+   the buffer), and reconsume the <span>current input character</span>
+   in the <span>script data escaped state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escape start state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. If the <var>temporary buffer</var> is the string "<code
+   title="">script</code>", then switch to the <span>script data
+   double escaped state</span>. Otherwise, switch to the <span>script
+   data escaped state</span>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Append the lowercase version of the <span>current input
+   character</span> (add 0x0020 to the character's code point) to the
+   <var>temporary buffer</var>. Stay in the <span>script data double
+   escape start state</span>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Append the <span>current input character</span> to the
+   <var>temporary buffer</var>. Stay in the <span>script data double
+   escape start state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <span>current input character</span> in the
+   <span>script data escaped state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escaped state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <span>script data double escaped dash state</span>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <span>script data double escaped less-than sign
+   state</span>.</p></dd>
+
+   <dt>EOF</dt>
+   <dd><span>Parse error</span>. Reconsume the EOF character in the
+   <span>data state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Stay in the <span>script data double escaped
+   state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escaped dash state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Switch to the
+   <span>script data double escaped dash dash state</span>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <span>script data double escaped less-than sign
+   state</span>.</p></dd>
+
+   <dt>EOF</dt>
+   <dd><span>Parse error</span>. Reconsume the EOF character in the
+   <span>data state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Switch to the <span>script data double escaped
+   state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escaped dash dash state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+002D HYPHEN-MINUS (-)</dt>
+   <dd>Emit a U+002D HYPHEN-MINUS character token. Stay in the
+   <span>script data double escaped dash dash state</span>.</dd>
+
+   <dt>U+003C LESS-THAN SIGN (<)</dt>
+   <dd><p>Emit a U+003C LESS-THAN SIGN character token. Switch to the
+   <span>script data double escaped less-than sign
+   state</span>.</p></dd>
+
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit a U+003E GREATER-THAN SIGN character token. Switch to the
+   <span>script data state</span>.</dd>
+
+   <dt>EOF</dt>
+   <dd><span>Parse error</span>. Reconsume the EOF character in the
+   <span>data state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Switch to the <span>script data double escaped
+   state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escaped less-than sign state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dd>Emit a U+002F SOLIDUS character token. Set the <var>temporary
+   buffer</var> to the empty string. Switch to the <span>script data
+   double escape end state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <span>current input character</span> in the
+   <span>script data double escaped state</span>.</dd>
+
+  </dl>
+
+
+  <h5><dfn>Script data double escape end state</dfn></h5>
+
+  <p>Consume the <span>next input character</span>:</p>
+
+  <dl class="switch">
+
+   <dt>U+0009 CHARACTER TABULATION</dt>
+   <dt>U+000A LINE FEED (LF)</dt>
+   <dt>U+000C FORM FEED (FF)</dt>
+   <!--<dt>U+000D CARRIAGE RETURN (CR)</dt>-->
+   <dt>U+0020 SPACE</dt>
+   <dt>U+002F SOLIDUS (/)</dt>
+   <dt>U+003E GREATER-THAN SIGN (>)</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. If the <var>temporary buffer</var> is the string "<code
+   title="">script</code>", then switch to the <span>script data
+   escaped state</span>. Otherwise, switch to the <span>script data
+   double escaped state</span>.</dd>
+
+   <dt>U+0041 LATIN CAPITAL LETTER A through to U+005A LATIN CAPITAL LETTER Z</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Append the lowercase version of the <span>current input
+   character</span> (add 0x0020 to the character's code point) to the
+   <var>temporary buffer</var>. Stay in the <span>script data double
+   escape end state</span>.</dd>
+
+   <dt>U+0061 LATIN SMALL LETTER A through to U+007A LATIN SMALL LETTER Z</dt>
+   <dd>Emit the <span>current input character</span> as a character
+   token. Append the <span>current input character</span> to the
+   <var>temporary buffer</var>. Stay in the <span>script data double
+   escape end state</span>.</dd>
+
+   <dt>Anything else</dt>
+   <dd>Reconsume the <span>current input character</span> in the
+   <span>script data double escaped state</span>.</dd>
+
+  </dl>
+
+
   <h5><dfn>Before attribute name state</dfn></h5>
 
   <p>Consume the <span>next input character</span>:</p>




More information about the Commit-Watchers mailing list