# Entities and special characters in Confluence storage

URL: https://goingstellar.ro/reference/confluence-storage-format/entities-special-characters/

Storage format is XML, so markup characters are escaped, and named entities such as mdash, ndash, nbsp and copy are accepted. After an ADF save Confluence writes them back as named entities. The legacy copyright and trademark macros do not survive that save.

## Storage format

```xml
&mdash;
&ndash;
&nbsp;
&lt; &gt; &amp;
```

## As ADF (Confluence Cloud)

The ADF that Confluence Cloud builds for:

```xml
<p>&lt;escaped&gt; &amp; entities &copy;</p>
```

```json
{
 "type": "doc",
 "content": [
  {
   "type": "paragraph",
   "content": [
    {
     "text": "<escaped> & entities ©",
     "type": "text"
    }
   ]
  }
 ],
 "version": 1
}
```

## Examples

Storage format sent:

```xml
<p>&mdash;</p>
```

An em dash as the documentation writes it. The view shows the character and ADF holds the character itself.

Rendered view (HTML):

```html
<p>—</p>
```

Storage format after the round trip through ADF:

```xml
<p>&mdash;</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p>&ndash;</p>
```

An en dash, for ranges. It follows the same pattern as the em dash.

Rendered view (HTML):

```html
<p>–</p>
```

Storage format after the round trip through ADF:

```xml
<p>&ndash;</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p>non&nbsp;breaking</p>
```

A non-breaking space. The view carries the real character, and ADF save writes the entity back.

Rendered view (HTML):

```html
<p>non breaking</p>
```

Storage format after the round trip through ADF:

```xml
<p>non&nbsp;breaking</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<p>&lt;escaped&gt; &amp; entities &copy;</p>
```

Literal angle brackets and an ampersand together with a copyright sign. The view decodes the copy entity but keeps the escapes.

Rendered view (HTML):

```html
<p>&lt;escaped&gt; &amp; entities ©</p>
```

Storage format after the round trip through ADF:

```xml
<p>&lt;escaped&gt; &amp; entities &copy;</p>
```

Sent to Confluence Cloud on 29 Nov 2026.

Storage format sent:

```xml
<ac:structured-macro ac:name="copyright"></ac:structured-macro>
```

The legacy copyright macro. It renders the symbol, and an ADF save leaves an empty paragraph.

Rendered view (HTML):

```html
<span class="$class conf-macro output-inline" data-hasbody="false" data-macro-id="<id>" data-macro-name="copyright" id="$id">
    <b> </b>
    <small>
        <sup>©</sup>
    </small>
</span>
```

Storage format after the round trip through ADF:

```xml
<p />
```

Sent to Confluence Cloud on 29 Nov 2026.

## What changes in conversion

- Named entities are decoded into characters in ADF text. When the ADF is saved back, storage again uses the named entity for the em dash, the en dash, the non-breaking space and the copyright sign.
- Escaped markup characters stay escaped. The ADF text holds the literal characters and storage writes lt, gt and amp.
- The copyright, trademark, registered trademark and service mark macros are not converted to characters. The ADF generated from each is an empty paragraph, so an ADF save removes the symbol.

## Where the documentation differs

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="copyright"></ac:structured-macro>
```

The documentation: The removed-macros page says Copyright macros are still visible and editable after conversion, and that existing macros migrate without any loss of data.

The actual result: The macro renders the copyright sign in storage and view. After an ADF save the storage holds an empty paragraph and the macro is gone.

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="tm"></ac:structured-macro>
```

The documentation: The removed-macros page says Trademark macros are still visible and editable after conversion, without any loss of data.

The actual result: After an ADF save the storage holds an empty paragraph and the trademark macro is gone.

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="reg-tm"></ac:structured-macro>
```

The documentation: The removed-macros page says Registered Trademark macros are still visible and editable after conversion, without any loss of data.

The actual result: After an ADF save the storage holds an empty paragraph and the registered trademark macro is gone.

Sent to Confluence Cloud, 29 Nov 2026:

```xml
<ac:structured-macro ac:name="sm"></ac:structured-macro>
```

The documentation: The removed-macros page says Service Mark macros are still visible and editable after conversion, without any loss of data.

The actual result: After an ADF save the storage holds an empty paragraph and the service mark macro is gone.

## Pitfalls

- The documentation describes storage format as XML, so literal angle brackets and ampersands should be written as escapes.
- Replace the symbol macros with real characters before any content goes through the Cloud editor.
- Only mdash, ndash, nbsp and copy were probed. Other named entities were not tested.

## Questions and answers

### Does storage format accept nbsp?

Yes, as the entity. It renders as a non-breaking space and is written back as the entity after an ADF save.

## Related

- [Paragraphs, line breaks and <hr>](https://goingstellar.ro/reference/confluence-storage-format/paragraphs-line-breaks/)
- [<sup> and <sub>](https://goingstellar.ro/reference/confluence-storage-format/superscript-subscript/)
- [Macros removed from the Cloud editor](https://goingstellar.ro/reference/confluence-storage-format/legacy-macros/)
- [HTML that storage format drops](https://goingstellar.ro/reference/confluence-storage-format/unsupported-html/)
- [<ac:emoticon> and emoji](https://goingstellar.ro/reference/confluence-storage-format/emoticons/)

## Sources

- [Confluence storage format (Atlassian Documentation)](https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html)
- [Atlassian Document Format: document structure (Atlassian Developer)](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)
- [Macros that are unavailable or have limited availability in the Cloud editor (Atlassian Support)](https://support.atlassian.com/confluence-cloud/docs/learn-which-macros-are-being-removed/)

