Skip to content

Commit

Permalink
[giow] (3) Be more strict about what <script type=''> handling should…
Browse files Browse the repository at this point in the history
… 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 4f64824
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 48 deletions.
36 changes: 20 additions & 16 deletions complete.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@


<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> <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> <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> </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd> <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt> <dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -16112,7 +16112,7 @@ <h4 id=the-style-element><span class=secno>4.2.6 </span>The <dfn><code>style</co


<div class=impl> <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, <p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types 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 with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown
Expand Down Expand Up @@ -17414,14 +17414,14 @@ <h5 id=scriptingLanguages><span class=secno>4.3.1.1 </span>Scripting languages</


<div class=impl> <div class=impl>


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


</div> </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> languages to which they refer:</p>


<dl><dt>"<code>application/ecmascript</code>"</dt> <dl><dt>"<code>application/ecmascript</code>"</dt>
Expand All @@ -17447,10 +17447,11 @@ <h5 id=scriptingLanguages><span class=secno>4.3.1.1 </span>Scripting languages</


</dl><div class=impl> </dl><div class=impl>


<p>User agents may support other <a href=#mime-type title="MIME type">MIME <p>User agents may support other <a href=#mime-type title="MIME type">MIME types</a> for other languages,
types</a> and other languages.</p> 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> be interpreted as scripting languages:</p>


<ul class=brief><li>"<code>text/plain</code>" <ul class=brief><li>"<code>text/plain</code>"
Expand All @@ -17471,12 +17472,15 @@ <h5 id=scriptingLanguages><span class=secno>4.3.1.1 </span>Scripting languages</
formats for data blocks, and it would be problematic if they were formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p> suddenly to be interpreted as script by a user agent.</p>


<!-- this paragraph is also present in the <style> section --> <!-- a similar 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 <p>When examining types to determine if they represent supported languages, user agents must not
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
parameter for the purpose of comparing <a href=#mime-type title="MIME type">MIME order of parameters matters is left undefined until such time as it matters; so far the only
types</a> here.</p> 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> </div>


Expand Down
36 changes: 20 additions & 16 deletions index
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@


<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> <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> <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> </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd> <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt> <dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -16112,7 +16112,7 @@ people expect to have work and what is necessary.


<div class=impl> <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, <p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types 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 with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown
Expand Down Expand Up @@ -17414,14 +17414,14 @@ o............A....e


<div class=impl> <div class=impl>


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


</div> </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> languages to which they refer:</p>


<dl><dt>"<code>application/ecmascript</code>"</dt> <dl><dt>"<code>application/ecmascript</code>"</dt>
Expand All @@ -17447,10 +17447,11 @@ o............A....e


</dl><div class=impl> </dl><div class=impl>


<p>User agents may support other <a href=#mime-type title="MIME type">MIME <p>User agents may support other <a href=#mime-type title="MIME type">MIME types</a> for other languages,
types</a> and other languages.</p> 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> be interpreted as scripting languages:</p>


<ul class=brief><li>"<code>text/plain</code>" <ul class=brief><li>"<code>text/plain</code>"
Expand All @@ -17471,12 +17472,15 @@ o............A....e
formats for data blocks, and it would be problematic if they were formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p> suddenly to be interpreted as script by a user agent.</p>


<!-- this paragraph is also present in the <style> section --> <!-- a similar 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 <p>When examining types to determine if they represent supported languages, user agents must not
with unknown parameters must be assumed to be unsupported. The <code title="">charset</code> parameter must be treated as an unknown ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
parameter for the purpose of comparing <a href=#mime-type title="MIME type">MIME order of parameters matters is left undefined until such time as it matters; so far the only
types</a> here.</p> 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> </div>


Expand Down
35 changes: 19 additions & 16 deletions source
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17183,7 +17183,7 @@ people expect to have work and what is necessary.


<div class="impl"> <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, <p>When examining types to determine if they support the language,
user agents must not ignore unknown MIME parameters &mdash; types user agents must not ignore unknown MIME parameters &mdash; types
with unknown parameters must be assumed to be unsupported. The <code with unknown parameters must be assumed to be unsupported. The <code
Expand Down Expand Up @@ -18662,14 +18662,14 @@ o............A....e


<div class="impl"> <div class="impl">


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


</div> </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> languages to which they refer:</p>


<dl> <dl>
Expand Down Expand Up @@ -18699,10 +18699,11 @@ o............A....e


<div class="impl"> <div class="impl">


<p>User agents may support other <span title="MIME type">MIME <p>User agents may support other <span title="MIME type">MIME types</span> for other languages,
types</span> and other languages.</p> 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> be interpreted as scripting languages:</p>


<ul class="brief"> <ul class="brief">
Expand All @@ -18727,13 +18728,15 @@ o............A....e
formats for data blocks, and it would be problematic if they were formats for data blocks, and it would be problematic if they were
suddenly to be interpreted as script by a user agent.</p> suddenly to be interpreted as script by a user agent.</p>


<!-- this paragraph is also present in the <style> section --> <!-- a similar 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 <p>When examining types to determine if they represent supported languages, user agents must not
with unknown parameters must be assumed to be unsupported. The <code ignore MIME parameters. Types are to be compared including all parameters.</p> <!-- whether the
title="">charset</code> parameter must be treated as an unknown order of parameters matters is left undefined until such time as it matters; so far the only
parameter for the purpose of comparing <span title="MIME type">MIME relevant parameter is 'e4x' -->
types</span> here.</p>
<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> </div>


Expand Down

0 comments on commit 4f64824

Please sign in to comment.