• Community
  • Questions
  • How to use renderContent API with a page that uses "code block" macro?

How to use renderContent API with a page that uses "code block" macro?

Hi,

I am using the renderContent API just like the answer in this question https://answers.atlassian.com/questions/7150/how-can-i-show-the-content-of-a-confluence-page-within-an-external-application.

But the page I am try to render contains a "code block" macro and all I get from the API is a script as shown below

<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[&lt;filter&gt;
        &lt;filter-name&gt;login_nego&lt;/filter-name&gt;
        &lt;filter-class&gt;fi.polarshift.confluence.lib.kauth.NegotiateLoginFilter&lt;/filter-class&gt;
    &lt;/filter&gt;]]></script>

How to properly render this?

Thanks,

1 answer

remove

<![CDATA[

so the escaped characters get parsed

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
Rachel Wright
Published yesterday in Training & Certification

How to Extend your Jira Administrator Certification

...; didn’t   know about Jira email!  For example, did you know Jira will try to send a notification message 10 times?  I didn’t!  As soon as I learned that, I searched for any active...

109 views 2 12
Read article

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