Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
13.10.6, 14.4
-
Unknown
-
N/A
-
N/A
-
Description
A wiki syntax like this
test {{mention reference="XWiki.kbernick" anchor="XWiki-kbernick-i3phd9"/}} text after
in a wiki page in XWiki/2.1 syntax seems to generate the following html:
<p>test <a class="xwiki-mention user" data-reference="xwiki:XWiki.kbernick" href="/xwiki/bin/view/XWiki/kbernick" id="XWiki-kbernick-i3phd9"> @Karsten Bernick </a> text after</p>
(the newlines in the html above are the original ones).
The newlines between the a tag and the label of the anchor element are actually relevant in HTML, they become whitespaces and are normalized together with the following whitespaces (the regular whitespace between the a ad the text) causing issues like XWIKI-20500 .
Expected markup:
There is no reason for the mention macro to not generate fully inline HTML, like this
<p>test <a class="xwiki-mention user" data-reference="xwiki:XWiki.kbernick" href="/xwiki/bin/view/XWiki/kbernick" id="XWiki-kbernick-i3phd9">@Karsten Bernick</a> text after</p>
with no newlines or spaces at all inside the a tag or in its label.
Attachments
Issue Links
- is caused by
-
XWIKI-19752 Privilege escalation (PR) from view rights through the mentions macro
- Closed
- relates to
-
XWIKI-20500 Whitespace to the right of a mention is not properly displayed when the mention is inside a text, in view mode: appears stuck to the text
- Closed