-
Suggestion
-
Resolution: Duplicate
-
None
-
None
-
Atlassian Confluence 2.10.2
The resulting content of user macros that are set to output wiki markup are always embedded in <p> tags.
For example, making a macro called "testmacro" with no body, the content set to "Macro generates wiki markup" and the template set to "testmacrocontent", then using it like so:
Let's test the {testmacro} in here.
Produces the following HTML:
<p>Let's test the <p>testmacrocontent</p> in here.</p>
This is very annoying for macros to generate things like links to sections in other pages, since these cannot be used inside of paragraphs.
The workarounds for this are very heavy-weight, and involve things like writing your own macro plugins.
Please do not mark this as a duplicate of CONF-5456. That issue was resolved with the claim:
The new user-macro stuff in 2.3 allows you to render macro bodies, and the render mode suppresses initial paragraph tags.
This is simply not true. According to my testing, any user macro, whether it has a body or not, that is rendered as wiki content, causes <p> tags to be rendered around the result.
- duplicates
-
CONFSERVER-10790 User macro output being wrapped inside a <p> paragraph
- Closed
- relates to
-
CONFSERVER-4219 Can not render wiki content as inline text using user macros
- Closed
-
CONFSERVER-5456 Allow user macros to be 'inline'
- Closed