xwikisas / xwiki-pro-macros

XWiki rendering macros useful when migrating content from Confluence
GNU Lesser General Public License v2.1
3 stars 12 forks source link

The expand macro generates invalid HTML #295

Closed oanat closed 2 months ago

oanat commented 2 months ago

To be precise, it generates a DIV inside the summary element:

<details>
  <summary>
    <span class="panel-title">Title</span>
  </summary>
  <div class="panel-body">Body</div>
</details>

According to Marius the specification of the summary element says https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary

The

element's contents can be any heading content, plain text, or HTML that can be used within a paragraph. ... Permitted content: Phrasing content or one element of Heading content

So DIV inside the summary element is not allowed. Replacing the DIV with a SPAN should fix the problem.

lucaa commented 2 months ago

@Farcasut @trrenty shouldn't this ticket also have a milestone, now that it's closed? To know in what version to expect it fixed?

trrenty commented 2 months ago

We usually create the milestone at release time and assign all the fixed issues to it. However, I do believe it would be better to create a new milestone right after a release and upgrade it to a minor version if any improvements were done.