W3C home > Mailing lists > Public > public-html-xml@w3.org > January 2011

Re: The interpretation of script

From: John Cowan <cowan@mercury.ccil.org>
Date: Mon, 17 Jan 2011 21:52:55 -0500
To: David Carlisle <davidc@nag.co.uk>
Cc: public-html-xml@w3.org
Message-ID: <20110118025255.GA26451@mercury.ccil.org>
David Carlisle scripsit:

> but that's the point: you then need totally different javascript (or  
> cdata in comment hacks) depending on whether you are serving  
> /application+xml or /html. Which negates much of the "dom consistency"  
> design of the rest of the system.

You can have DOM consistency or textual consistency in such cases,
but not both.  If you have plain-text content (JavaScript or not) in a
script element, you need to escape it when delivering as XHTML, and not
escape it when delivering as HTML.  This is no different from a raft of
other points.

-- 
But the next day there came no dawn,            John Cowan
and the Grey Company passed on into the         cowan@ccil.org
darkness of the Storm of Mordor and were        http://www.ccil.org/~cowan
lost to mortal sight; but the Dead
followed them.          --"The Passing of the Grey Company"
Received on Tuesday, 18 January 2011 02:53:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 January 2011 02:53:25 GMT