Content rendered twice if layout is preceded by other markup

Description

If in the storage format of a page the layout markup is preceded by some other markup, for example a paragraph, or text, for example a newline character, Viewport renders the content twice.

For example, a page with the following body:

1 2 3 4 5 6 7 8 9 10 11 <p> </p> <ac:layout> <ac:layout-section ac:type="two_equal"> <ac:layout-cell> <p>Left column.</p> </ac:layout-cell> <ac:layout-cell> <p>Right column.</p> </ac:layout-cell> </ac:layout-section> </ac:layout>

is rendered like this:

The Confluence editor doesn't allow content outside of the layout, but apparently there are cases where the storage format ends up that way.

Environment

None

Status

Assignee

Maximilian Hilbert (K15t)

Reporter

Maximilian Hilbert (K15t)

Labels

Participants

None

Deployment

None

Components

Sprint

None

Fix versions

Priority

Minor