Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.0 M1, 1.9.1
-
None
-
any
-
nested macros
-
Unit
-
Unknown
-
Description
XWiki 2.0 input:
{{html wiki="true"}}{{velocity}}abc{{/velocity}}{{/html}}
XHTML 1.0 output:
<!--startmacro:html|-|wiki="true"|-|{{velocity}}abc{{/velocity}}--><!--startmacro:velocity|-||-|abc--><p>abc</p><!--stopmacro--><!--stopmacro-->
XWiki 2.0 output after re-parsing:
{{html wiki="true"}}{{velocity}}abc{{/velocity}}{{/html}}
{{velocity}}abc{{/velocity}}
Notes:
- The nested velocity macro generates unnecessary meta data. I though we decided that only the top level macro generates meta data because only that meta data is required to reconstruct the content. For instance, the following
{{velocity}}{{html}}abc{{/html}}{{/velocity}}
doesn't generate meta data for the nested HTML macro:
<!--startmacro:velocity|-||-|{{html}}abc{{/html}}--><p>abc</p><!--stopmacro-->
Anyway, I changed the WYSIWYG code to handle nested macro start/stop comments.
- The velocity macro is duplicated. I suspect this happens because of the nested start/stop velocity macro comments. The output of the HTML macro shouldn't be parsed because all the required information is in the HTML start macro comment.
Attachments
Issue Links
- blocks
-
XWIKI-4085 Content duplicated if i have a macro (toc, id..) in an html macro
- Closed