Home Replace text returned from messages.properties in gsp
 I have a text in gsp as follows:  The problem is the message returned can contain characters such as & and when exporting this gsp to pdf, the following error occurs: Caused by: org.xml.sax.SAXParseException; lineNumber: 396; columnNumber: 44; The entity name must immediately follow the '&' in the entity reference. at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)  This issue could be resolved if & could be replaced by & I have tried using g:encodeAs but that didn't help. I cannot change the & in messages.properties to & or and. Is it even possible to replace a text returned from messages.properties before rendering in gsp?