- From: Henri Sivonen <hsivonen@iki.fi>
- Date: Thu, 15 Dec 2011 15:56:24 +0200
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/
Received on Thursday, 15 December 2011 05:56:24 UTC