, &, ", and ' without any special treatment. The section is terminated by a three-character sequence consisting of two right brackets ("]]") followed by a greater-than (">"). If this sequence appears in your text, a workaround is to drop out of the CDATA section, output part of the terminator, then start a new CDATA section and output the rest. Let's do this now: ]]>]] Newlines and spacing are retained as well, as long as they're evaluated in a context that bothers preserving them. Whether or not the spaces before and after the CDATA section are also preserved may be application-dependent. ]]>