[ZPT] CDATA section in zpt

Fergal Daly fergal at esatclear.ie
Fri Nov 25 19:42:57 EST 2005


<content:encoded>
<![CDATA[
   <span tal:replace="..." />
]]>
</content:encoded>

is essentially the same as

<content:encoded>

   &lt;span tal:replace=&quot;...&quot; /&gt

</content:encoded>

so TAL doesn't see a <span> element at all. It could be done with something like

<content:encoded>
<span tal:replace="structure string:&lt;![CDATA[${...}&gt;">
</content:encoded>

which has different escaping (which may actually be desirable) or to
achieve identical escaping,

<span tal:replace="structure string:&lt;![CDATA["><span tal:replace="...">
<span tal:replace="structure &gt;">

F

On 11/25/05, Dieter Maurer <dieter at handshake.de> wrote:
> Chris Withers wrote at 2005-11-25 12:48 +0000:
> >The TAL interpretter parses the source of hte ZPT as XML, and so doesn't
> >  do anything with CDATA sections.
>
> But XML knows about "CDATA" sections and an XML compatible parser
> should handle them correctly.
>
> --
> Dieter
> _______________________________________________
> ZPT mailing list
> ZPT at zope.org
> http://mail.zope.org/mailman/listinfo/zpt
>


More information about the ZPT mailing list