There are 2 comments.
 
 
XWiki Rendering / cid:jira-generated-image-avatar-11e1010b-872c-4001-b094-621839d02ddd XRENDERING-796 Open

HTML structure code is displayed in Wiki editor

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-b4829dfe-22a3-46c5-8a4e-739b5497dac9 Marius Dumitru Florea on 28/Aug/25 10:46
 

Nikita Petrenko, Vincent Massol this is a rendering issue: the rendered HTML is invalid because it has block level elements (DIV) inside a paragraph, which the browser tries to fix by splitting the paragraph, thus messing up the macro markers. Basically, the following XWiki syntax:

[[

{{info}}Type your information message here.{{/info}}>>https://www.xwiki.org/xwiki/bin/view/Main/]]

is rendered to HTML as:

<p>
  <span class="wikiexternallink">
    <a href="https://www.xwiki.org/xwiki/bin/view/Main/">
      <div class="box infomessage">
        <span class="icon-block"><img src="/xwiki/resources/icons/silk/information.png?cache-version=1756279834000" alt="Icon" data-xwiki-lightbox="false" /></span>
        <span class="sr-only">Information</span>
        <div>
          <p>Type your information message here.</p>
        </div>
      </div>
    </a>
  </span>
</p>

Note that a similar behavior is obtained with this wiki syntax:

[[


test>>Some.Page]]

that is rendered as:

<p>
  <span class="wikicreatelink">
    <a href="/xwiki/bin/create/Some/Page/WebHome?parent=Sandbox.Foo.WebHome">
      <div class="wikimodel-emptyline"></div>
      test
    </a>
  </span>
</p>

And with this wiki syntax as well:

[[(((test)))>>Some.Page]]

that is rendered as:

<p>
  <span class="wikicreatelink">
    <a href="/xwiki/bin/create/Some/Page/WebHome?parent=Sandbox.Foo.WebHome">
      <div>test</div>
    </a>
  </span>
</p>

So it looks like we have a problem parsing / rendering the link label. We allow block level content inside it, even if links are mostly used inline, inside paragraphs, where block content is not allowed.

 
cid:jira-generated-image-avatar-b4829dfe-22a3-46c5-8a4e-739b5497dac9 Marius Dumitru Florea on 28/Aug/25 10:47
 

Nikita Petrenko I reported XWIKI-23489 for a related problem you were having.