There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-9a41ebb2-c236-495b-affd-2fd3726cfdcc XWIKI-23471 Open

HTML structure code is displayed in Wiki editor

 
View issue   ยท   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-b25ef761-af50-4e74-a637-e1cab972829a Changes by Nikita Petrenko on 19/Aug/25 16:10
 
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&lt;org.xwiki.rendering.block.Block&gt;" class="xwiki-metadata-container">Type your information message here.</span></a></p></div></div><!--stopmacro--><!--stopwikilink--><p>&nbsp;</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.