[racket] XML library: representing CDATA

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Jan 4 17:13:17 EST 2012

An hour and a half ago, Jay McCarthy wrote:
> I believe its main use is in including Javascript output where XML
> quoting will cause stuff like "1 < 2" to fail to compile in most
> browsers. In that case, it is very important that the CDATA tags not
> be there (i.e. we WANT invalid XML) because browsers will break on
> that too.

If you're worried about using it to generate contents with scripts,
then there's no need to produce invalid XML -- a common hack which I'm
using in the web pages is:

  <script type="text/javascript">

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.