Skip to content

Commit 36470c1

Browse files
authored
Do not whitespace-strip <script>'s language="" attribute
This matches implementations, which only whitespace-strip the type="" attribute. Closes #7923.
1 parent 5ddb6b4 commit 36470c1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

source

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60180,8 +60180,10 @@ o............A....e
6018060180
<p>then let <var>the script block's type string</var> for this <code>script</code> element be
6018160181
"<code data-x="">text/javascript</code>".</p>
6018260182

60183-
<p>Otherwise, if <var>el</var> has a <code data-x="attr-script-type">type</code> attribute,
60184-
then let <var>the script block's type string</var> be the value of that attribute.</p>
60183+
<p>Otherwise, if <var>el</var> has a <code data-x="attr-script-type">type</code> attribute, then
60184+
let <var>the script block's type string</var> be the value of that attribute with <span
60185+
data-x="strip leading and trailing ASCII whitespace">leading and trailing ASCII whitespace
60186+
stripped</span>.</p>
6018560187

6018660188
<p>Otherwise, <var>el</var> has a non-empty <code data-x="attr-script-language">language</code>
6018760189
attribute; let <var>the script block's type string</var> be the concatenation of "<code
@@ -60195,10 +60197,9 @@ o............A....e
6019560197
attribute present.</p>
6019660198
</li>
6019760199

60198-
<li><p>If <var>the script block's type string</var> with <span data-x="strip leading and
60199-
trailing ASCII whitespace">leading and trailing ASCII whitespace stripped</span> is a
60200-
<span>JavaScript MIME type essence match</span>, then set <var>el</var>'s <span
60201-
data-x="concept-script-type">type</span> to "<code data-x="">classic</code>".</p></li>
60200+
<li><p>If <var>the script block's type string</var> is a <span>JavaScript MIME type essence
60201+
match</span>, then set <var>el</var>'s <span data-x="concept-script-type">type</span> to "<code
60202+
data-x="">classic</code>".</p></li>
6020260203

6020360204
<li><p>Otherwise, if <var>the script block's type string</var> is an <span>ASCII
6020460205
case-insensitive</span> match for the string "<code data-x="">module</code>", then set

0 commit comments

Comments
 (0)