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.

1 answer

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

326 views 17 10
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