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:
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. |