Including literal JSON content in Velocity (avoiding HTML escapes)

I'm trying to use the Velocity engine embedded in Atlassian's products (and exposed through com.atlassian.templaterenderer) to substitute a JSON value into a template.

In the template, this looks a bit like the following:

  foo = $foo

However, when I render the template with "foo" mapped to a string ["bar", "baz"], the output is the following:

  foo = [&quot;bar&quot;, &quot;baz&quot;]

How can this be avoided?


Atlassian has an event handler which performs escaping on any variable with a name not ending with WithHtml.


foo = $fooWithHtml

expands as desired.

This is not a default behavior, looks like you have EscapeHtmlReference event handler registered either in your or in java initialization. More details on event handlers here.

Need Your Help

How to change icon files with code constant on xCode?

ios xcode plist application-settings

I'm building an app that has a Free version and Paid version.

MEF Import Composition Issues

c# .net mef

I've read all the questions I can find regarding the issues of composing imports without exporting the containing class but I can't find a solution to my problem. Does anybody know a way to achieve...