Details
-
Bug
-
Resolution: Fixed
-
Major
-
16.2.0
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
When saving content where macros have been repaired by the browser due to block content in inline macros, it can happen that there are two spans nested in each other that both contain metadata attributes. This can be reproduced with this content. Here is a snippet of the HTML that is submitted by the browser that causes the issue:
<h2 id="HText1" style="text-align: center;" class="wikigeneratedid wikigeneratedheader"><span data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container"><span data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" data-xwiki-wikimacrocontent="true" class="xwiki-metadata-container"><span><span style="color:#ccffff">Text 1</span></span></span></span></h2>
These metadata attributes are merged together into one element by WikiModel with a class that contains twice the value xwiki-metadata-container. Due to this, the cleanup code doesn't recognize this as metadata anymore and doesn't remove the metadata attributes such that they end up in XWiki syntax.