Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
15.0
-
None
-
Unknown
-
Description
Converting from annotated html to xwiki/2.1 using DefaultHTMLConverter.fromHTML can remove macros.
For instance:
{{velocity wiki="false"}} $services.wysiwyg.fromAnnotatedXHTML('<!--startmacro:paragraphs-numbering|-||-|= H1 = == H2 == = H1 \{\{reference id="HH1"/}} H2 \{\{reference id="HH2"/}} =--><div data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container"><h1 id="HH1" class="wikigeneratedid wikigeneratedheader"><span>H1</span></h1><h2 id="HH2" class="wikigeneratedid wikigeneratedheader"><span>H2</span></h2><h1 id="HH1H2" class="wikigeneratedid wikigeneratedheader"><span>H1 <!--startmacro:reference|-|id="HH1"--><!--stopmacro--> H2 <!--startmacro:reference|-|id="HH2"--><!--stopmacro--></span></h1></div><!--stopmacro--><!--startmacro:context|-|document="Main.WebHome"|-|= H1 = == H2 == = H1 \{\{reference id="HH1"/}} H2 \{\{reference id="HH2"/}} = --><!--stopmacro--><div class="wikimodel-emptyline"></div><h1 id="HH1H2A0" class="wikigeneratedid"><span>H 1 <!--startmacro:reference|-|id="HH1"--><!--stopmacro--> H 2 <!--startmacro:reference|-|id="HH2"--><!--stopmacro--></span></h1>', 'xwiki/2.1') {{/velocity}}
Returns
{{paragraphs-numbering}} = H1 = == H2 == = H1 H2 = {{/paragraphs-numbering}} {{context document="Main.WebHome"}} = H1 = == H2 == = H1 {{reference id="HH1"/}} H2 {{reference id="HH2"/}} = {{/context}} = H 1 {{reference id="HH1"/}} H 2 {{reference id="HH2"/}} =
The last header in paragraphs-rendering does not contains the expected reference macros
Could be related to XWIKI-19271?
Note: the affect version needs to be refined