Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
1.5-RC4
-
None
-
Allways (Tomcat, Jetty)
Description
When Model contains variable with special char (i.e. '<') generated output is broken.
...
map.put("test", "<thisistest");
templateContext = Model.ofMap(map);
vp = new VelocityPanel("velpanel", templateContext) {
...
I have patched in official Velocity way in. VelocityPanel lines about 191:
import org.apache.velocity.app.event.EventCartridge;
import org.apache.velocity.app.event.implement.EscapeHtmlReference;
....
final VelocityContext ctx = new VelocityContext(map);
EventCartridge ec = new EventCartridge();
ec.addEventHandler(new EscapeHtmlReference());
ec.attachToContext(ctx);
Patched project require maven dependency of "oro" because of exception