User macro mangling content inside

David Yu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2013

I'm trying to create the world's most simple user macro in Confluence V5:

The macro type is: Rendered

## @noparams
$body

Looks good so far in use...any content I type inside the macro box in the editor displays its text. I can even embed a {pane} macro inside and it renders great!

As soon as I try a {tip} macro, it breaks. It seems to mangle the HTML inside...the span for the tip icon isn't closed and leaks into the rest of the content:

<span class="aui-icon icon-success">
      <div class="message-content">
.
.
.
      </div>
</span>

Any suggestions on how to get this rendering properly? Thanks.

2 answers

1 accepted

0 votes
Answer accepted
David Yu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2013
0 votes
Ryan Goodwin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2013

Hi David,

For accessing confluence macro's in xhtml, you should use format like this:

<ac:macro ac:name="profile">
 
    <ac:parameter ac:name="user">admin</ac:parameter>
 
</ac:macro>

Hope this helps!

David Yu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 26, 2013

But I can't expect end-users to know this...I can't predict what macros users will put inside my user-macro.

Maybe the question I should really be asking is: are other macros supported inside a user macro?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events