How to change from GeneralUtil to HtmlUtil in velocity templates?

Hugo Ingelmo September 4, 2019

I had :

$generalUtil.htmlEncode

in my code, and now for Confluence 7 we need to change it to:

$htmlUtil.htmlEncode

 But the latter is not working.

Am I missing something? Any import?

I am using Confluence 6.0.6.

1 answer

0 votes
andrea
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 17, 2019

You can add <velocity-context-item key="htmlUtil" class="com.atlassian.confluence.util.HtmlUtil" context-key="htmlUtil" global="true"></velocity-context-item> in the config xml

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events