[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [syndication] Re: Digest Number 130



On Mon, 25 Sep 2000, Aaron Swartz wrote:

> Ian Graham <ian.graham@utoronto.ca> wrote:
> 
> > (a) put the HTML inside a CDATA section (to escape it, so to speak),
> > or (b) use things like base64 encoding (and/or compression) to package
> > the data up.  Both are, unfortunately, non-simple.....
> 
> There's also the option of using entity encoding (like &lt;br&gt;) -- this
> is supported by almost all parsers and most HTML/XML-enabled scripting
> environments. Of course, it's much harder than a CDATA section to read by
> hand (which is the purpose of XML to begin with).
> 
> What's so non-simple about a CDATA section, though? It seems to me rather
> easy to output the opening and closing CDATA tags. A problem may be that it
> isn't properly supported by some parsers, but this is a fault of the parser
> (since it is in the spec), and shouldn't be too difficult to remedy.

I meant non-simple in the 'I can author this by hand' sense. As a pure
coding issue it is by far the easiest choice -- the only thing you need to
escape would be any bare ]]>'s inside the HTML (or, equally well, XML)  
markup. 

I'll have more up on the Web site on this later this week :-)

Ian