I've this code in my template :


    <?xml version='1.0' encoding='utf-8' ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>


            <script type="text/javascript">/*<![CDATA[*/

            var DaysPanel = Class.$extend({
                __init__ : function(dom_node) {







When Chameleon template engine process this file, I've this error :


    RuntimeError: Caught exception rendering template.
     - Expression: ``extend``
     - Filename:   /home/harobed/projets/harobed.org/todo_panel/
     - Arguments:  macros: <Macros - at 0xab7ff2c>
                   renderer_name: todo_panel:templates/main.pt
                   xincludes: <XIncludes - at 0xab62c8c>
                   context: <instance None at 0xac2102c>
                   view: <function my_view at 0xab0a33c>
                   request: <Request - at 0xac2108c>
                   template: <PageTemplateFile - at 0xab62c4c>

    NameError: extend

I use /*<![CDATA[*/ and /*]]>*/ to escape javascript code, but $extend 
raise one error.

What is the good solution to escape my javascript code ?

Thanks for your help,

Repoze-dev mailing list

Reply via email to