Details
-
Bug
-
Resolution: Fixed
-
High
-
8.3.0
-
1
-
Severity 2 - Major
-
1
-
Description
Issue Summary
This is reproducible on Data Center: (yes)
If a macro parameter has HTML like <br/> or <hr/>, then the parameter is not saved in the Storage XML on page save. This happens with STATUS macro as well as user created macros.
For this to work, the macro needs to have a String parameter
<xhtml-macro name="ecohelp-macro" key="ecohelp-macro" class="com.atlassian.ecohelp.macro.EcohelpMacro" hasBody="true" bodyType="rendered" outputType="html"> <parameters> <parameter name="html" type="string" default="" description="HTML goes here" /> </parameters> </xhtml-macro>
When viewing the macro before the page update we see in the HTML <table/> that displays the grey macro box the attribute is
data-macro-parameters="html=this will break<br/>"
When saving the storage format clearly has <ac:parameter ac:name="html"></ac:parameter> missing
<ac:structured-macro ac:name="ecohelp-macro" ac:schema-version="1" ac:macro-id="53c87043-f519-40e8-85ba-c06b84f8ef50"><ac:rich-text-body> <p>Can I break this?</p></ac:rich-text-body></ac:structured-macro>
And on second edit the display <table/> is also missing the data-macro-parameters.
However, it works with
<p>a paragraph</p>
but anywhere in the HTML it has the <br/> or similar, it breaks.
This is also an issue on site upgrades where macros in earlier versions of Confluence, on upgrade will have the parameters removed on page edit.
Steps to Reproduce
- Create a status macro
- For the Title enter text<br/> and click INSERT
- Update the page
Expected Results
The macro displays as expected.
Actual Results
All data entered into the parameter fields is missing.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available