Skip to content

Commit

Permalink
Do not whitespace-strip <script>'s language="" attribute
Browse files Browse the repository at this point in the history
This matches implementations, which only whitespace-strip the type="" attribute.

Closes #7923.
  • Loading branch information
hiroshige-g authored Jul 8, 2022
1 parent 5ddb6b4 commit 36470c1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -60180,8 +60180,10 @@ o............A....e
<p>then let <var>the script block's type string</var> for this <code>script</code> element be
"<code data-x="">text/javascript</code>".</p>

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

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

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

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

0 comments on commit 36470c1

Please sign in to comment.