Hello,
this user macro, that I posted a picture of below, suddenly stopped working and is only displaying $htmlUtil.htmlEncode($content.displayTitle)
I can't seem to fix it. I think this happend after the last patch of Confluence to version 8.5.4.
How can I fix it? We use this macro a lot in our organization.
Hello @Sara von Hofsten ,
I can see that HtmlUtil should be available in velocity context according to the docs: https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity, but really, it is not.
As an option, if HTML is rendered with a variable assignment, the variable name needs to end with "Html". This will render HTML instead of escaping it.
Example: $outputHtml
instead of $output
So you can try to create the variable with the title ending with 'html' to be escaped, like:
#set($titleHtml = $content.displayTitle )
$content.displayTitle ## as is
<br>
$titleHtml ## escaped
<br>
https://confluence.atlassian.com/doc/user-macro-template-syntax-223906130.html
adding HtmlUtil to string in setenv.sh fixed the html problem.
The macro output looks correct but there's some problem with the lik to parent page. I get page not found or insufficient permission error, but i guess it's a macro problem and not a server problem :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.