framework: support CDATA sections in <template> for templates that are not well-formed XML