I'm in favor of the proposal. It solves all of the cases I know about.
For what it's worth, libraries do not, today, bother dealing with html and
frameset. Here are the regular expressions jQuery uses in its cleaning
process:
https://github.com/jquery/jquery/blob/master/src/manipulation.js#L17-42
Yehuda Katz
(ph) 718.877.1325
On Wed, Apr 25, 2012 at 1:51 PM, Erik Arvidsson <arv@chromium.org> wrote:
> My concern with the proposal is that it currently requires libraries
> to still do a regexp and special case frameset and html.
>
> We should imply the correct context for all tags in HTML5, not matter
> if we like them or not. I think it is important that any valid HTML
> with one top level node works and results in a firstChild that
> directly map to the input.
>
> On Wed, Apr 25, 2012 at 12:39, Rafael Weinstein <rafaelw@google.com>
> wrote:
> >> frag.innerHTML = "<frameset></frameset>a<!-- b -->"
>
> The context for this should be HTMLHtmlElement
>
> <frameset>
> <!-- b -->
>
> "a" gets dropped because it not valid as a child of <html>
>
> >> frag.innerHTML = "<html><body>foo</html>bar<tr></tr>"
>
> "root" context
>
> <html>
> <head>
> <body>
> foobar
>
> >> frag.innerHTML = "<html><body>foo</html><tr></tr>"
>
> <html>
> <head>
> <body>
> foo
>
> --
> erik
>