When viewing a page, you may see the following error message:

An error occurred: com.hannonhill.cascade.model.render.page.PageRenderException: Could not transform with Script format "path/to/format": Error on line ##: The entity name must immediately follow the '&' in the entity reference.

or

An error occurred: com.hannonhill.cascade.model.render.page.PageRenderException: Could not transform with Script format "path/to/format": Error on line ##: The reference to entity "..." must end with the ';' delimiter.

This usually indicates that an ampersand (&) character in a variable isn't being properly escaped in the format listed in the error message.

To address this, navigate to the format specified in the error message, and escape any variables that may contain non-XML-friendly content such as titles, descriptions, or links that may contain URL parameters.

For example, if you're outputting a title variable with:

<h1>$title</h1>

Escape the content using something like the $_EscapeTool:

<h1>${_EscapeTool.xml($title)}</h1>

This will ensure any invalid characters such as & are escaped as &amp; .

Did this answer your question?