cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject VelocityGenerator and string escaping
Date Wed, 21 Jul 2004 14:15:39 GMT
I found VelocityGenerator hadly usable because of lack of value 
escaping. Example:

flow.js:
var elem = "<test>";
cocoon.sendPage( "view.vm", { elem: elem } );

view.vm:
<root>$elem</root>

this unfortunatelly produces:
<root><elem></root>
which is an invalid xml

Has anyone overcome this problem? I could write simple string encoder 
but it surely wouldn't handle entities nicely and wouldn't be as 
performant as some tested OS solution.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl



Mime
View raw message