Skip to content

Commit

Permalink
[cgiowt] (3) Turn off a quirk in foreign lands when doing innerHTML p…
Browse files Browse the repository at this point in the history
…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
Hixie committed Jun 6, 2013
1 parent 143a22a commit 8210e68
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 30 deletions.
22 changes: 12 additions & 10 deletions complete.html
Expand Up @@ -91312,21 +91312,23 @@ <h6 id=parsing-main-inselect><span class=secno>12.2.5.4.16 </span>The "<dfn titl
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>

Expand Down
22 changes: 12 additions & 10 deletions index
Expand Up @@ -91312,21 +91312,23 @@ document.body.appendChild(text);
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>

Expand Down
22 changes: 12 additions & 10 deletions source
Expand Up @@ -101990,21 +101990,23 @@ document.body.appendChild(text);
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>

Expand Down

0 comments on commit 8210e68

Please sign in to comment.