Hi!
I'm trying to automatically update a page's content via the REST API but it seems I cannot send style along the HTML. For example, It will accept this:
<span>Something</span>
But not this:
<span style="color: red;">Something</span>
If I send the style information, I get:
{"statusCode":400,"data":{"authorized":false,"valid":true,"errors":[]},"message":"Error parsing xhtml"}
The only way I can send the content is raw, with no color. Is there a way to do this afterwards (using the API)? Or if there a way to allow the style to be sent to Confluence?
This answer might be helpful: https://community.atlassian.com/t5/Answers-Developer-Questions/Confluence-REST-API-gives-Error-parsing-xhtml/qaq-p/499519
Try escaping the double quotes with: \"
Hi! Thanks for the answer!
That seemed to be the problem. I had tried to escape the quote marks but It seems I skipped something and it keept failing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am still getting error 500 using below. Any suggesttions?
<span style=\"color: red;\">Something</span>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.