[whatwg] <!DOCTYPE html><body><table><math><mi>foo</mi></math></table>
Henri Sivonen
hsivonen at iki.fi
Thu Dec 15 05:56:24 PST 2011
On Tue, Dec 13, 2011 at 4:23 AM, Adam Barth <w3c at adambarth.com> wrote:
> I'm trying to understand how the HTML parsing spec handles the following case:
>
> <!DOCTYPE html><body><table><math><mi>foo</mi></math></table>
>
> According to the html5lib test data, we should parse that as follows:
>
> | <!DOCTYPE html>
> | <html>
> | <head>
> | <body>
> | <math math>
> | <math mi>
> | "foo"
> | <table>
The expectation of the test case makes sense.
> However, I'm not sure whether that's what the spec actually does.
I think that's a spec bug.
> The net result of which is popping the stack of open elements, but not
> flushing out the pending table character tokens list.
The reason why Gecko does what makes sense is that Gecko uses a text
accumulation buffer for non-table cases, too, and any tag token
flushes the buffer. (Not quite optimal for ignored tags, sure.)
--
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/
More information about the whatwg
mailing list