[ http://issues.apache.org/jira/browse/COCOON-1657?page=all ]
Jean-Baptiste Quenot updated COCOON-1657: ----------------------------------------- Velocity is not XML-aware, so you have to design your template so that it is well-formed XML. If you think this is a problem, please provide a patch to resolve the issue in a timely manner. > VelocityGenerator: error when sending string containing ampersand > ----------------------------------------------------------------- > > Key: COCOON-1657 > URL: http://issues.apache.org/jira/browse/COCOON-1657 > Project: Cocoon > Type: Bug > Components: Blocks: Velocity > Versions: 2.1.7 > Reporter: Andreas Deininger > Assignee: Cocoon Developers Team > > Take this flowscript: > function velotest() { > cocoon.sendPage("abstract.vm", { "test" : "vm&vm" } ); > } > With abstract.vm being an velocity template processed by the Velocity > Generator: > <?xml version ?> > <data>$test</data> > You receive the following error, due to the occurence of the > ampersand-sign in the "vm&vm" string:: > An Error Occurred: The reference to entity "vm" must end with the ';' > delimiter. > This seems to be due to the fact that the sent value is not escaped, i.e. & > remains & and does not get converted to & in the resulting XML. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
