Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

" being escaped when using API only when in {code} block in wiki representation

Steven Collins
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!
April 30, 2018

Hi,

I've got an issue currently when trying to update/create a new page in confluence via the rest API.

 

I'm currently generating the wiki format using Node.JS and posting the data using the API endpoint POST/PUT /rest/api/content. within the page there are several " used, some within normal text and other times within code macro blocks. What I am finding is that when a " is used within a '{code}' it is escaped to become '"' instead of being displayed as a ". Everywhere else on the page the " is being displayed correctly.

 

Is there a parameter that I am meant to be specifying when using the wiki representation to prevent this xml escaping from occurring when i create/update a page? or is there a specific way i should be escaping the " before sending the body? (I'm currently just using \" as the escape).

 

I did see a lot of posts about using '#disable_html_escaping()' however I am not using velocity templates and as far as I could discern it was only for velocity templates.

 

Regards,

Steven

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events