Steps to reproduce:
- Trigger editing of any test wiki pages in WYSIWYG editor
- Switch to source code and paste code
[[
{{info}}Type your information message here.{{/info}}>>https://www.xwiki.org/xwiki/bin/view/Main/]]
- Return to WYSIWYG editor and switch to source mode and back several times
Actual result At somepoint on random switch to source mode, you will see the HTML code instead of the macro syntax, and you may end up saving the page with that content.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><body><p><!--startwikilink:false|-|url|-|https://www.xwiki.org/xwiki/bin/view/Main/--><span class="wikiexternallink"><a href="https://www.xwiki.org/xwiki/bin/view/Main/"><!--startmacro:info|-||-|Type your information message here.--><!--stopmacro--></a></span><!--stopwikilink--></p><div class="box infomessage"><a href="https://www.xwiki.org/xwiki/bin/view/Main/"><span class="sr-only">Information</span></a><div><p><a href="https://www.xwiki.org/xwiki/bin/view/Main/"><span data-xwiki-non-generated-content="java.util.List<org.xwiki.rendering.block.Block>" class="xwiki-metadata-container">Type your information message here.</span></a></p></div></div><!--stopmacro--><!--stopwikilink--><p> </p></body></html>
Expected result The source code is loaded properly on switching between WYSIWYG and Wiki mode Note And it seems that it can only be reproduced if the macro is filled in incorrectly (some parameters are missing or something else). I can't end with HTML structure code if I define any XWiki macro correctly in wiki mode or insert it from WYSIWYG toolbar. |