How to clear hidden formatting and unwanted HTML tags in page

Still need help?

The Atlassian Community is here for you.

Ask the community

 

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

  

Summary

It can happen that a Confluence page unexpectedly contains hidden formatting and unwanted HTML tags, which potentially cause a variety of issues, such as:

  • Bad formatting
  • Formatting discrepancy between Editing and Published modes, for example:

Editing mode Published mode

You can use a function provided by Confluence to clear the formatting.

Diagnosis

Although it depends on each case, generally, you can use the "View Storage Format" function to browse the stored content to determine whether your page is affected by these unwanted HTML tags. For example:

Page storage format
<ac:layout><ac:layout-section ac:type="single"><ac:layout-cell>
<p><span class="plugin_pagetree_children_span"> <a>Item 1</a> </span></p>
<p><span class="plugin_pagetree_children_span"> <a>Item 2</a> </span></p>
<p style="text-align: left;"><span class="plugin_pagetree_children_span"> <a>Item 3</a> </span></p></ac:layout-cell></ac:layout-section><ac:layout-section ac:type="single"><ac:layout-cell>
<ul class="plugin_pagetree_children_list">
<li>
<p><span class="plugin_pagetree_children_span"> <a>Item A</a> </span></p></li>
<li>
<p><span class="plugin_pagetree_children_span"> <a>Item B</a> </span></p></li>
<li><span class="plugin_pagetree_children_span"> <a style="text-align: left;">Item C</a> </span></li></ul></ac:layout-cell></ac:layout-section></ac:layout>

In this case, the <span> tags were causing issues.

Solution

Clear formatting

The handy approach is "Clear formatting". This works mainly for style-wise HTML issues.

While editing the affected page, select the target elements and hit "Clear formatting".

Clear formatting


Last modified on Sep 17, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.