Problems with passing $body to a macro in a user macro

I have a user macro meant to wrap the metadata macro, and am trying to pass $body to the macro. It basically works, except that no matter whether I choose rendered or unrendered, I get visible (evidently escaped) HTML in the output, and the actual body (which is a short bit of plain text) is surrounded by visible HTML p and span tags, so it looks like this:

<p><span>This part should be visible, but those tags either shouldn't be there or should be rendered as HTML</span></p>

The macro code I'm using is below. (I've tried various permutations, leaving out the plain-text-body or the CDATA tags, and all of them gave me no output.)

## @param term:title=Term|type=string|required=true|desc=The term you are defining.
<ac:macro ac:name="metadata"><ac:parameter ac:name="0">glossry $paramterm</ac:parameter>

1 answer

1 accepted

I ended up using string functions to remove the extra tags from $body. I'd still love to know why they were showing up.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

344 views 20 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you