Skip to content
Permalink
Browse files

[giow] (3) Be more strict about what <script type=''> handling should…

… look like.

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16887
Affected topics: HTML

git-svn-id: http://svn.whatwg.org/webapps@7493 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 31, 2012
1 parent 700f538 commit 4f6482425175f794f4df34564c29c382f1a62f69
Showing with 59 additions and 48 deletions.
  1. +20 −16 complete.html
  2. +20 −16 index
  3. +19 −16 source

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 October 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 31 October 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>

<div class=impl>

<!-- this paragraph is also present in the <script> section -->
<!-- similar paragraph is also present in the <script> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown

<div class=impl>

<p>A user agent is said to <dfn id=support-the-scripting-language>support the scripting language</dfn>
if <var><a href="#the-script-block's-type">the script block's type</a></var> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the <a href=#mime-type>MIME type</a> string
of a scripting language that the user agent implements.</p>
<p>A user agent is said to <dfn id=support-the-scripting-language>support the scripting language</dfn> if each component of <var><a href="#the-script-block's-type">the
script block's type</a></var> is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the corresponding
component in the <a href=#mime-type>MIME type</a> string of a scripting language that the user agent
implements.</p>

</div>

<p>The following lists some <a href=#mime-type>MIME type</a> strings and the
<p>The following lists the <a href=#mime-type>MIME type</a> strings that user agents must recognize, and the
languages to which they refer:</p>

<dl><dt>"<code>application/ecmascript</code>"</dt>

</dl><div class=impl>

<p>User agents may support other <a href=#mime-type title="MIME type">MIME
types</a> and other languages.</p>
<p>User agents may support other <a href=#mime-type title="MIME type">MIME types</a> for other languages,
but must not support other <a href=#mime-type title="MIME type">MIME types</a> for the languages in the list
above. User agents are not required to support the languages listed above.</p>

<p>The following <a href=#mime-type title="MIME type">MIME types</a> must not
<p>The following <a href=#mime-type title="MIME type">MIME types</a> (with or without parameters) must not
be interpreted as scripting languages:</p>

<ul class=brief><li>"<code>text/plain</code>"
formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p>

<!-- this paragraph is also present in the <style> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown
parameter for the purpose of comparing <a href=#mime-type title="MIME type">MIME
types</a> here.</p>
<!-- a similar paragraph is also present in the <style> section -->

<p>When examining types to determine if they represent supported languages, user agents must not
ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
order of parameters matters is left undefined until such time as it matters; so far the only
relevant parameter is 'e4x' -->

<p class=note>For example, types that include the <code title="">charset</code> parameter will
not be recognized as referencing any of the scripting languages listed above.</p>

</div>

36 index

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 30 October 2012</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 31 October 2012</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>

<div class=impl>

<!-- this paragraph is also present in the <script> section -->
<!-- similar paragraph is also present in the <script> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown

<div class=impl>

<p>A user agent is said to <dfn id=support-the-scripting-language>support the scripting language</dfn>
if <var><a href="#the-script-block's-type">the script block's type</a></var> is an <a href=#ascii-case-insensitive>ASCII
case-insensitive</a> match for the <a href=#mime-type>MIME type</a> string
of a scripting language that the user agent implements.</p>
<p>A user agent is said to <dfn id=support-the-scripting-language>support the scripting language</dfn> if each component of <var><a href="#the-script-block's-type">the
script block's type</a></var> is an <a href=#ascii-case-insensitive>ASCII case-insensitive</a> match for the corresponding
component in the <a href=#mime-type>MIME type</a> string of a scripting language that the user agent
implements.</p>

</div>

<p>The following lists some <a href=#mime-type>MIME type</a> strings and the
<p>The following lists the <a href=#mime-type>MIME type</a> strings that user agents must recognize, and the
languages to which they refer:</p>

<dl><dt>"<code>application/ecmascript</code>"</dt>

</dl><div class=impl>

<p>User agents may support other <a href=#mime-type title="MIME type">MIME
types</a> and other languages.</p>
<p>User agents may support other <a href=#mime-type title="MIME type">MIME types</a> for other languages,
but must not support other <a href=#mime-type title="MIME type">MIME types</a> for the languages in the list
above. User agents are not required to support the languages listed above.</p>

<p>The following <a href=#mime-type title="MIME type">MIME types</a> must not
<p>The following <a href=#mime-type title="MIME type">MIME types</a> (with or without parameters) must not
be interpreted as scripting languages:</p>

<ul class=brief><li>"<code>text/plain</code>"
formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p>

<!-- this paragraph is also present in the <style> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown
parameter for the purpose of comparing <a href=#mime-type title="MIME type">MIME
types</a> here.</p>
<!-- a similar paragraph is also present in the <style> section -->

<p>When examining types to determine if they represent supported languages, user agents must not
ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
order of parameters matters is left undefined until such time as it matters; so far the only
relevant parameter is 'e4x' -->

<p class=note>For example, types that include the <code title="">charset</code> parameter will
not be recognized as referencing any of the scripting languages listed above.</p>

</div>

35 source

<div class="impl">

<!-- this paragraph is also present in the <script> section -->
<!-- similar paragraph is also present in the <script> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code

<div class="impl">

<p>A user agent is said to <dfn>support the scripting language</dfn>
if <var>the script block's type</var> is an <span>ASCII
case-insensitive</span> match for the <span>MIME type</span> string
of a scripting language that the user agent implements.</p>
<p>A user agent is said to <dfn>support the scripting language</dfn> if each component of <var>the
script block's type</var> is an <span>ASCII case-insensitive</span> match for the corresponding
component in the <span>MIME type</span> string of a scripting language that the user agent
implements.</p>

</div>

<p>The following lists some <span>MIME type</span> strings and the
<p>The following lists the <span>MIME type</span> strings that user agents must recognize, and the
languages to which they refer:</p>

<dl>

<div class="impl">

<p>User agents may support other <span title="MIME type">MIME
types</span> and other languages.</p>
<p>User agents may support other <span title="MIME type">MIME types</span> for other languages,
but must not support other <span title="MIME type">MIME types</span> for the languages in the list
above. User agents are not required to support the languages listed above.</p>

<p>The following <span title="MIME type">MIME types</span> must not
<p>The following <span title="MIME type">MIME types</span> (with or without parameters) must not
be interpreted as scripting languages:</p>

<ul class="brief">
formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p>

<!-- this paragraph is also present in the <style> section -->
<p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code
title="">charset</code> parameter must be treated as an unknown
parameter for the purpose of comparing <span title="MIME type">MIME
types</span> here.</p>
<!-- a similar paragraph is also present in the <style> section -->

<p>When examining types to determine if they represent supported languages, user agents must not
ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
order of parameters matters is left undefined until such time as it matters; so far the only
relevant parameter is 'e4x' -->

<p class="note">For example, types that include the <code title="">charset</code> parameter will
not be recognized as referencing any of the scripting languages listed above.</p>

</div>

0 comments on commit 4f64824

Please sign in to comment.
You can’t perform that action at this time.