VelocityPanel does'n escape special char from Model
---------------------------------------------------

                 Key: WICKET-3770
                 URL: https://issues.apache.org/jira/browse/WICKET-3770
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-core, wicket-extensions
    Affects Versions: 1.5-RC4
         Environment: Allways (Tomcat, Jetty)
            Reporter: Jacek Czerwinski


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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to