-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
Severity 3 - Minor
-
When using the excerpt macro with multiple lines, the macro produces invalid HTML when rendered in view or export_view modes.
Steps to reproduce:
- Create a new page
- Insert a standard paragraph with some text
- In the next line insert an excerpt macro with two lines of content (linebreak between these lines)
- Add another paragraph after the macro
- See attached screenshot from the editor for comparison.
- Get the view and export_view representation via REST API:
-
- Open <CONFLUENCE_BASE_URL>/wiki/rest/api/content/<PAGE_ID>?expand=body.storage,body.view,body.export_view in the same browser.
As you'll see the storage format has proper paragraphs around each line (both in and outside the macro):
<p>Below is an excerpt.</p>
<ac:structured-macro ac:name="excerpt" ...>
<ac:rich-text-body>
<p>First line in excerpt.</p>
<p>Second line in excerpt.</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>Above was the excerpt.</p>
The export_view format however lost the opening <p> of the first paragraph in the macro, and the closing </p> of the second line:
<p>Below is an excerpt.</p> First line in excerpt.</p> <p>Second line in excerpt. <p>Above was the excerpt.</p>
The view format is also broken, but differently (first line text in excerpt has been moved out of the paragraph, which is now empty <p></p>):
<p>Below is an excerpt.</p> <span class=\"conf-macro output-inline\" data-hasbody=\"true\" data-macro-name=\"excerpt\" data-macro-id=\"030f0358-b9d1-49dd-9326-b2b0df87434e\" data-layout=\"default\" data-local-id=\"973bec76-c955-4a63-94c2-81f6525e94f9\"> First line in excerpt. <p></p> <p>Second line in excerpt.</p> </span> <p>Above was the excerpt.</p>
- mentioned in
-
Page Loading...