W3C home > Mailing lists > Public > public-html@w3.org > June 2010

How to parse </foo </bar>

From: Adam Barth <w3c@adambarth.com>
Date: Tue, 22 Jun 2010 13:42:15 -0700
Message-ID: <AANLkTikpgpKApuuwkbcgwjtenFACUhMPyI8Y1u5oKJI_@mail.gmail.com>
To: HTML WG <public-html@w3.org>
Cc: Henri Sivonen <hsivonen@iki.fi>, Eric Seidel <eric@webkit.org>, Alexey Proskuryakov <ap@webkit.org>
WebKit received a bug report [1] about a layout problem on
http://www.macruby.org/ due to the HTML5 parsing algorithm.  (You can
visit the site in a Firefox or WebKit nightly build to see the issue.)
 The trouble boils down to this reduction:

Should say PASS:
  <div style="visibility:hidden">

Essentially, the missing ">" on the close tag of the <p> element
causes the tokenizer to consume the </div> characters as well,
resulting in the wrong DOM.  According to my tests, both the legacy
WebKit parser and the legacy Firefox parser terminate a tag token upon
encountering a "<" character.  The HTML5 spec recognizes that case as
a parse error, but has different error recovery.  (This issue is on
our "top five" list of behavioral differences likely to cause
compatibility problems.)

Is there a particular reason why we don't terminate start and end tag
tokens upon encountering a "<" character?


[1] https://bugs.webkit.org/show_bug.cgi?id=40961
Received on Tuesday, 22 June 2010 20:43:07 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:20 UTC