Re: Is there Unicode mail out there?

From: John Cowan (cowan@mercury.ccil.org)
Date: Fri Jul 20 2001 - 14:04:00 EDT


Ayers, Mike scripsit:

> Simple. Since "]]>" is used to mark the end of a CDATA section, and
> since CDATA can contain anything, if you want to put the sequence "]]>"
> INSIDE your CDATA, then you must escape the ">", or else it will END your
> CDATA.

That isn't what it says, and isn't true to boot. There is no way at
all to put "]]>" into a CDATA section.

If you change the ">" to ">", it will not terminate the CDATA section,
true -- but because entity references aren't recognized in CDATA sections,
your application will wind up with the literal characters '&', 'g', 't', ';'.

About all you can do is terminate the CDATA section, insert the ">", and
restart the CDATA section, thus:

        ]]]]>><![CDATA[

where the first "]]" is inside the CDATA section, the next "]]>" terminates
it, the next ">" is outside, and the "<![CDATA[" starts the new CDATA section.

Of course the DOM will not treat this as identical, but so much the worse
for the DOM.

-- 
John Cowan                                   cowan@ccil.org
One art/there is/no less/no more/All things/to do/with sparks/galore
	--Douglas Hofstadter



This archive was generated by hypermail 2.1.2 : Fri Jul 20 2001 - 14:45:58 EDT