I think that CDATA is special enough as to have its own handler, I mean that it should be equivalent to 'structure'. Since TAL should output XML valid documents, having a way to specify a CDATA section seems logical.
ie: <script tal:content="cdata myJsCode"></script> <pre tal:content="cdata myExampleCode"></pre> What I'm not sure of is how would it escape the cdata mark for 'script' contents. Should it assume // is a common enough to use it as default, should /* */ be used so it's ok also for CSS? ciao, ivan On Tue, Oct 14, 2008 at 11:28 AM, Kornel Lesiński < [EMAIL PROTECTED]> wrote: > On 14-10-2008 at 10:08:15 Ernesto Baschny [cron IT] <[EMAIL PROTECTED]> > wrote: > > It would be cool to have a "tal:cdata=" boolean value, where one could >> switch on generation of CDATA wrapping automatically, so one could write: >> >> <script tal:content="structure myJsCode" tal:cdata="true"></script> >> >> And doesn't have to remember all kinds of required CDATA quoting. >> > > Something like that would be nice indeed. I think it would be even better > if PHPTAL could automatically add CDATA to <script> when it's needed. > > -- > regards, Kornel > > > _______________________________________________ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal >
_______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal