Pretty printing Confluence HTML

We often use the Command Line Interface to download a page, edit it in a Linux text editor and upload again. For some kinds of editing, that's just much easier.

The machine-generated HTML that comes out of Confluence 4 is remarkably editor unfriendly, with run-on lines and no indentation for lists or tables.

Does anyone have a pretty printer for Confluence HTML? The standard Linux program tidy(1) barfs on the <ac:> tags.

2 answers

1 vote
David Simpson Community Champion Jul 02, 2013

The storage format is XML based with a custom namespace.

Really, you need to

  1. get a hold of the schema
  2. wrap the content in a new root element with the namespacing specified
  3. parse in tidy with namespacing enabled

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

60 views 3 2
Join discussion

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