Special Characters for Confluence Rest API content

Lawrence Chase
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2018

When using the confluence REST API and posting HTML for the content when I have a > or < in the content it errors out.  When I read a page content with a > or < I see it come out as &lt; and &gt; respectively.  When I switch my content post to use the same representation, they show up literally as &lt; and &gt; in the page instead of the < and >.

1 answer

0 votes
Boris Berenberg - Atlas Authority
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.
March 29, 2018

What content type are you submitting your request body as?

Jordan Carson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 18, 2024

I know this is an old post, however I am facing the same issue. 

Trying to hit the following: https://<confluence base>/confluence/rest/api/content?spaceKey={SPACEKEY}&title={TITLE}&expand=body.storage"

When the title includes a ">" or "<" it completely breaks/errors, however it does work when these symbols are encoded.

  • > is %3E
  • < is %3C

I cannot find anything in the documentation on special characters, is there a list of which characters that must be encoded for the API to not error out?


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events