Forums

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

What version of html does Confluence support?

Sasha Morozevich November 1, 2022

I am using the confluence api to create a confluence page from html embedded in json (see example code at bottom)

I can create confluence pages successfully using simple html (e.g. <p>Hello, World</p>) but as soon as I venture to more complex html, I receive internal server errors (http 500 response)

What version of html does Confluence support? It's obviously not HTML5...it doesn't even support the <!DOCTYPE> tag)!

data = f'{{"type":"page", "title":"{TITLE}", "space":{{"key":"{SPACE}"}}, "body":{{"storage":{{"value":"{BODY}", "representation":"storage"}}}}}}}}'
headers = {'Content-Type': 'application/json'}
res = requests.post(URL, auth=(USERNAME, PASSWORD), data=data, headers=headers)

 

2 answers

1 accepted

2 votes
Answer accepted
Sasha Morozevich November 1, 2022

The answer is Confluence uses XHTML Storage Format, which is not even HTML.  In fact, it more resembles XML but shares some overlap with HTML hence examples like <p> Hello, World </p> render correctly.

0 votes
Sasha Morozevich November 1, 2022

No one knows the answer?  You'd expect there to be some documentation somewhere...

Sasha Morozevich November 1, 2022

@Nicolas Grossi 

I believe the version of confluence I am using is near the latest (7.19.1).

I don't believe I use any macros.  So if I install an html5 macro, confluence will magically render html5 finally?  Or is there any more work to do?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events