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 #: Element type "img" must be followed by either attribute specifications, ">" or "/>".

This indicates that an image tag in a format is being interrupted from closing by an unescaped character such as a quotation mark. This can often happen in alternative text attributes.

To address this, navigate to the format specified in the error message, and escape any variables that may contain problematic content such as titles or alternative text. For example, if you're outputting an image tag with:

<img src="${path}" alt="${alt}"/>

You can escape your alternative text attribute using the $_EscapeTool:

<img src="${path}" alt="${_EscapeTool.xml($alt)}"/>

This will ensure any problematic characters like " are escaped as &quot; .

Did this answer your question?