Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[cgiowt] (3) Turn off a quirk in foreign lands when doing innerHTML p…
…arsing Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=17924 Affected topics: HTML Syntax and Parsing git-svn-id: http://svn.whatwg.org/webapps@7918 340c8d12-0b0e-0410-8428-c7bf67bfef74
- Loading branch information
Showing
with
36 additions
and 30 deletions.
- +12 −10 complete.html
- +12 −10 index
- +12 −10 source
parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so | ||
that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub", | ||
"sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A | ||
start tag whose tag name is "font", if the token has any attributes named "color", "face", or | ||
"size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but | ||
legacy <font>s won't --> | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> | ||
<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face", | ||
or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG | ||
but legacy <font>s won't --> | ||
|
||
<dd> | ||
|
||
<p><a href=#parse-error>Parse error</a>.</p> | ||
|
||
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in | ||
scope">have an element in scope</a> that is a <a href=#mathml-text-integration-point>MathML text integration point</a>, an | ||
<a href=#html-integration-point>HTML integration point</a>, or an element in the <a href=#html-namespace-0>HTML namespace</a>, or if the | ||
<a href=#stack-of-open-elements>stack of open elements</a> has only one element, then process the token <a href=#using-the-rules-for>using the | ||
rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" <a href=#insertion-mode>insertion | ||
mode</a>. (<a href=#fragment-case>fragment case</a>)</p> | ||
<!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to | ||
innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML | ||
is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop | ||
to in the first place). Therefore, rather than trying to figure out in what convoluted | ||
conditions we could actually do this quirk for innerHTML, we just don't do it at all. --> | ||
|
||
<p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>, | ||
then act as described in the "any other start tag" entry below. (<a href=#fragment-case>fragment case</a>)</p> | ||
|
||
<p>Otherwise:</p> | ||
|
parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so | ||
that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub", | ||
"sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A | ||
start tag whose tag name is "font", if the token has any attributes named "color", "face", or | ||
"size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but | ||
legacy <font>s won't --> | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> | ||
<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face", | ||
or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG | ||
but legacy <font>s won't --> | ||
|
||
<dd> | ||
|
||
<p><a href=#parse-error>Parse error</a>.</p> | ||
|
||
<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in | ||
scope">have an element in scope</a> that is a <a href=#mathml-text-integration-point>MathML text integration point</a>, an | ||
<a href=#html-integration-point>HTML integration point</a>, or an element in the <a href=#html-namespace-0>HTML namespace</a>, or if the | ||
<a href=#stack-of-open-elements>stack of open elements</a> has only one element, then process the token <a href=#using-the-rules-for>using the | ||
rules for</a> the "<a href=#parsing-main-inbody title="insertion mode: in body">in body</a>" <a href=#insertion-mode>insertion | ||
mode</a>. (<a href=#fragment-case>fragment case</a>)</p> | ||
<!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to | ||
innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML | ||
is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop | ||
to in the first place). Therefore, rather than trying to figure out in what convoluted | ||
conditions we could actually do this quirk for innerHTML, we just don't do it at all. --> | ||
|
||
<p>If the parser was originally created for the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing algorithm</a>, | ||
then act as described in the "any other start tag" entry below. (<a href=#fragment-case>fragment case</a>)</p> | ||
|
||
<p>Otherwise:</p> | ||
|
parser -->, "p", "pre", "ruby", "s", <!--"script",--> "small", "span", "strong", "strike"<!-- so | ||
that s and strike can be handled uniformly throughout the parser -->, <!--"style",--> "sub", | ||
"sup", "table"<!--by inspection-->, "tt", "u", "ul", "var"</dt> <!-- this list was determined | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> <dt>A | ||
start tag whose tag name is "font", if the token has any attributes named "color", "face", or | ||
"size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG but | ||
legacy <font>s won't --> | ||
empirically by studying over 6,000,000,000 pages that were specifically not XML pages --> | ||
<dt>A start tag whose tag name is "font", if the token has any attributes named "color", "face", | ||
or "size"</dt> <!-- the attributes here are required so that SVG <font> will go through as SVG | ||
but legacy <font>s won't --> | ||
|
||
<dd> | ||
|
||
<p><span>Parse error</span>.</p> | ||
|
||
<p>If the <span>stack of open elements</span> does not <span title="has an element in | ||
scope">have an element in scope</span> that is a <span>MathML text integration point</span>, an | ||
<span>HTML integration point</span>, or an element in the <span>HTML namespace</span>, or if the | ||
<span>stack of open elements</span> has only one element, then process the token <span>using the | ||
rules for</span> the "<span title="insertion mode: in body">in body</span>" <span>insertion | ||
mode</span>. (<span>fragment case</span>)</p> | ||
<!-- for sanity's sake, we limit this wacked quirk to legacy full-document parsing, not to | ||
innerHTML. We have no data showing whether (or that) this is needed for innerHTML. If innerHTML | ||
is used on an SVG or MathML node, it definitely doesn't make any sense (there's nothing to pop | ||
to in the first place). Therefore, rather than trying to figure out in what convoluted | ||
conditions we could actually do this quirk for innerHTML, we just don't do it at all. --> | ||
|
||
<p>If the parser was originally created for the <span>HTML fragment parsing algorithm</span>, | ||
then act as described in the "any other start tag" entry below. (<span>fragment case</span>)</p> | ||
|
||
<p>Otherwise:</p> | ||
|