|
Environment: |
XWiki 17.7.0-RC with PostgreSQL 17.2 on Tomcat 10.1.34 |
Description: |
h3. Steps to reproduce: # Trigger editing of any test wiki pages in WYSIWYG editor # Switch to source code and paste code {code:none} [[
{{info}}Type your information message here.{{/info}}>>https://www.xwiki.org/xwiki/bin/view/Main/]] {code} # Return to WYSIWYG editor and switch to source mode and back several times
h3. 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. {code:none} <!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> {code} h3. Expected result
The source code is loaded properly on switching between WYSIWYG and Wiki mode h3. Note
And it 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. |
|