Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
6.2.1
-
N/A
-
N/A
-
Description
The following xwiki/2.1 syntax code:
{{include reference="DoesNotMatterIfExistsOrNot"/}}{{velocity}} hi (((ho))) {{/velocity}}
generates the following html output:
<p></p> <--- why? <p>hi</p> <div><p>ho</p></div> <p></p> <--- why?
The problem seems to occur when the include macro is used next to the velocity macro (possibly other inline macros that support wiki syntax?) and inside that macro, a group is defined.
Those empty paragraphs generated before and after the include-velocity macro pair can cause HTML validation problems
Note: when the included document does exist and contain content, the output is this:
<p></p> <--- why? <p>aa</p> <--- content of the included document <p>hi</p> <div><p>ho</p></div> <p></p> <--- why?
Workaround for getting rid of the paragraphs:
((({{include reference="DoesNotMatterIfExistsOrNot"/}}{{velocity}} hi (((ho))) {{/velocity}})))
obviously outputs:
<div> <p>hi</p> <div><p>ho</p></div> </div>
Attachments
Issue Links
- is related to
-
XWIKI-8723 Invalid html in statistics panels.
- Closed