How to clear hidden formatting and unwanted HTML tags in page
プラットフォームについて: Cloud および Data Center - この記事はクラウドと Data Center 両方のプラットフォームに等しく適用されます。
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.
*Fisheye および Crucible は除く
要約
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:
You can use a function provided by Confluence to clear the formatting.
診断
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:
<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.
ソリューション
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".