This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-4abfa9b5-5276-4d27-ac28-f7c236e5c385 XWIKI-25577 Open

The Attachment Selector macro declares inline support but breaks the sentence it is placed in

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4e467775-f981-42aa-be3a-54edae434312 Charpentier Lucas created this issue on 23/Oct/26 16:31
 
Summary: The Attachment Selector macro declares inline support but breaks the sentence it is placed in
Issue Type: cid:jira-generated-image-avatar-4abfa9b5-5276-4d27-ac28-f7c236e5c385 Bug
Affects Versions: 17.10.14, 18.8.0
Assignee: Unassigned
Components: Attachments
Created: 23/Oct/26 16:31
Priority: cid:jira-generated-image-static-major-7a737482-3ec2-42ca-b582-cf13cb073062 Major
Reporter: Charpentier Lucas
Description:

The Attachment Selector macro declares that it supports the inline mode, but its output is a block: placed in the middle of a sentence, it breaks the sentence in two.

Steps to reproduce

  1. Edit a page in the wiki editor and write a sentence with the macro inside it:
    Before {{attachmentSelector classname="..." property="attachment"/}} after.
    
  2. View the page.
  • Expected: the selector inside the sentence, between "Before" and "after".
  • Actual: <p>Before <p><span class="displayed">name</span></p> after.</p>, a paragraph inside a paragraph, which breaks the line. With savemode="direct" the output is a div holding a paragraph and the button, so the sentence is split too.

The macro is defined in AttachmentSelector.xml. The fix is either to output inline elements, a span instead of the paragraph and the div, when the macro is called inline, or to stop declaring the inline support.

KOs covered

Macro Criterion Problem
attachmentSelector E4 inline-support The macro declares inline support but its output is a block: in a sentence it renders a paragraph inside a paragraph, or a div with savemode="direct", which splits the sentence.

Impact found on macro fluidity

This KO comes from the WYSIWYG usability audit of the macros, under the criterion E4 inline-support of its usability criteria, which checks that the inline support a macro declares matches its behavior. The page of the macro, linked in the table, has the full notes.