Confluence Velocity Templates: WithHtml suffix in variable


I’ve recently discovered that in Confluence Apps Templates, variables with WithHtml doesn’t get escaped when rendered.

Like a template like this, content in the errormsg is properly encoded if there is any HTML like content in it.


And if the variable has a suffix ‘WithHtml’ like this:


Then any HTML in the variable is rendered 1:1 into the template.

I couldn’t find any documentation on this. Is this documentation somewhere? Or is this a Velocity built in construct?

Hi Roman,

I recently came across this as well. Seems to be a feature which is only documented for older jira version but also apply for confluence => JIRA 6.0 - HTML escaping for velocity templates


1 Like