It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why does the body of my macro now display as raw html after upgrading to Confluence 6? Edited

Matt Boesch Sep 07, 2017

I will preface this by saying I am not really a plugin developer (or much of a Java developer anymore). A while ago, I modified/customized a plugin for Confluence 5.5.7 and it displays and works fine.  Now that I upgrade to Confluence 6.2.1, it displays raw html from the body instead of formatted text.  For example, the body is being displayed as the following in the browser

<p>You have agreed to the terms and conditions. Please proceed to<span style="font-size:large;font-face:serif" class="conf-macro output-inline" data-hasbody="true" data-macro-name="span"> <a href="/display/sbirsttrac/SBIR-STTR+Advisory+Committee+Meetings">SBIR-STTR Advisory Committee Meetings</a>, <a href="/display/sbirsttrac/Working+Groups">Working Groups</a> or <a href="/display/sbirsttrac/Travel%2C+Reimbursement%2C+and+Conflict">Travel, Reimbursement, and Conflict</a> </span> </p>

 with the source from the browser being

<p>You have agreed to the terms and conditions. Please proceed to<span style="font-size:large;font-face:serif" class="conf-macro output-inline" data-hasbody="true" data-macro-name="span"> <a href="/display/sbirsttrac/SBIR-STTR+Advisory+Committee+Meetings">SBIR-STTR Advisory Committee Meetings</a>, <a href="/display/sbirsttrac/Working+Groups">Working Groups</a> or <a href="/display/sbirsttrac/Travel%2C+Reimbursement%2C+and+Conflict">Travel, Reimbursement, and Conflict</a> </span> 

 The storage format is 

<ac:structured-macro ac:name="group-signup" ac:schema-version="1" ac:macro-id="71de1bf0-cd35-405d-a75a-12910b0a8596"><ac:parameter ac:name="button">I Agree</ac:parameter><ac:parameter ac:name="key">sbirsttrac</ac:parameter><ac:rich-text-body>
<p>You have agreed to the terms and conditions. Please proceed to</p><ac:structured-macro ac:name="span" ac:schema-version="1" ac:macro-id="0adb94ba-0f56-47cf-b65c-88b31f02df9b"><ac:parameter ac:name="style">font-size:large;font-face:serif</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body>
<p><ac:link><ri:page ri:content-title="SBIR-STTR Advisory Committee Meetings" /></ac:link>, <ac:link><ri:page ri:content-title="Working Groups" /></ac:link> or <ac:link><ri:page ri:content-title="Travel, Reimbursement, and Conflict" /></ac:link></p></ac:rich-text-body></ac:structured-macro>
<p class="auto-cursor-target"><br /></p></ac:rich-text-body></ac:structured-macro>

 So basically, I have my plugin/macro and inside it as the body I have "You have agreed to the terms and conditions. Please proceed to". Then while still inside my plugin/macro body I use the span macro and in the body of that I have confluence page links.  

What do I need to do to get my plugin/macro to display as it did previously and interpret the html and not escape it?  Is there something I need to possibly change in my Java class?

1 answer

0 votes
Matt Boesch Sep 20, 2017

Does anybody have any thoughts on this or need more details?  It seems like this may be a straight forward answer for those that do Confluence plugin development.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Confluence

6 Awesome Ways to Apply Trello, JIRA and Confluence to your Project

I attended  Atlassian Summit 2019  and learned a lot from the presenters, attendees and knowledgeable Atlassian product managers. The presentations I attended focused on applying Agile, pla...

2,588 views 12 29
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you