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
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,268 views 2 13
Read article

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