I'm writing a plugin for a new Web Panel on the issues screen in Jira 5.0.1.
In that panel I pull a field in and try to display it. The field has embedded HTML and I want to format it.
The way to do this appears to be to use $textutils.htmlEncode(xxxx) method in the velocity template, but whatever I do the method does not appear to be called all I get in the output is $textutils.htmlEncode(xxxx) in the output.
If I just output the field contents (i.e. remove the outer htmlEncode method), it appears fine but without formatting.
Am I missing some way of "importing" $textutils into my plugin? I thought it should be in the default velocity context.