W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: noscript in HTML fragment serialization algorithm

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 4 Sep 2009 20:49:53 +0000 (UTC)
To: Henri Sivonen <hsivonen@iki.fi>
Cc: Geoffrey Sneddon <gsneddon@opera.com>, HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0909042042040.6775@hixie.dreamhostps.com>
On Wed, 2 Sep 2009, Henri Sivonen wrote:
> On Sep 2, 2009, at 03:01, Ian Hickson wrote:
> > On Wed, 26 Aug 2009, Geoffrey Sneddon wrote:
> > > 
> > > The fragment serialization algorithm currently says, "If the parent 
> > > of current node is a style, script, xmp, iframe, noembed, noframes, 
> > > noscript, or plaintext element, then append the value of current 
> > > node's data DOM attribute literally."
> > > 
> > > Does the reference to noscript not need to be "noscript (if 
> > > scripting is enabled)" so that innerHTML can roundtrip?
> > 
> > If scripting is disabled, how are you setting innerHTML?
> 
> From a browser extension or user script.

Interoperability in those cases doesn't matter since those are 
vendor-specific situations.


On Wed, 2 Sep 2009, Simon Pieters wrote:
> 
> IIRC, Genshi uses this algorithm, and it has scripting disabled.

As far as I can tell, just making it dependent on whether scripting was 
enabled or not doesn't work for round-tripping -- for that case, what 
matters is whether scripting was enabled or not at parse time.

I've changed it to handle this case in the naive way (just excluding 
noscript if scripting is disabled), but note that there are a number of 
other things that break which would be much harder to fix (e.g. <noscript>
in <head> containing elements that break out of <head> will parse very 
differently, and I don't really see any sane way to round-trip that.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 4 September 2009 20:47:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:48 GMT