On 14-10-2008 at 10:53:58 Iván -DrSlump- Montes <[EMAIL PROTECTED]>
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
documents, having a way to specify a CDATA section seems logical.
ie: <script tal:content="cdata myJsCode"></script>
<pre tal:content="cdata myExampleCode"></pre>
Trick with CDATA is really needed only in <script>. It wont't work in most
elements (including <pre>) in text/html mode, so I think it's not worth to
make it a global attribute (when someone uses real XML, they shouldn't be
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?
I'd use /**/ in JS, because it is safer (e.g. won't break if someone has
postprocessing filter that removes line breaks).
For CSS it isn't needed as much, becase "<" and "&" aren't used in CSS
syntax (except strings in generated content, which are rare).
PHPTAL mailing list