This issue has been created
 
 
Confluence / cid:jira-generated-image-avatar-7153805a-5b6f-4fda-97da-70f0094e33e7 CONFLUENCE-290 Open

Link tags not handled properly when inside a macro parameter

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-fa3a4d61-7151-4f68-8288-c7905805be1a Teodor Caras created this issue on 09/Oct/24 21:07
 
Summary: Link tags not handled properly when inside a macro parameter
Issue Type: cid:jira-generated-image-avatar-7153805a-5b6f-4fda-97da-70f0094e33e7 Bug
Affects Versions: 9.56.0
Assignee: Unassigned
Components: Syntax - XHTML
Created: 09/Oct/24 21:07
Priority: cid:jira-generated-image-static-major-4b213650-b70d-4462-9601-4f87de354081 Major
Reporter: Teodor Caras
Description:

In certain versions on confluence, external link passed as parameters are not handled properly. Instead of being passed as a parameter to the macro event, it is handled as a standalone link, outside the macro call. For example, the following confluence syntax:

 

<ac:structured-macro ac:name="lozenge" ac:schema-version="1"
    ac:macro-id="40373a62-b942-4525-b8d1-3771615f053a">
    <ac:parameter ac:name="color">blue</ac:parameter>
    <ac:parameter ac:name="arrow">none</ac:parameter>
    <ac:parameter ac:name="icon">https://icon-library.com/images/img_524932.png</ac:parameter>
    <ac:parameter ac:name="link">
        <a href="https://www.bing.com/images/search?q=icon">
            https://www.bing.com/images/search?q=icon</a>
    </ac:parameter>
    <ac:parameter ac:name="width">auto</ac:parameter>
    <ac:parameter ac:name="title">Some vewy pwetty title</ac:parameter>
    <ac:rich-text-body>
        <p>ALSDLJDLKJ jhkdaskj kjaskjhdaksj huoquwoeiwqu oidaoiduasoiu oiqwkhlklwqejlk
            kjldaslasjkldasqw op oiqo[ewq][ kfdskl;fsklj kjl klasd </p>
    </ac:rich-text-body>
</ac:structured-macro>

Results in the following xwiki syntax:

 

[[https:~~/~~/www.bing.com/images/search?q=icon>>url:https://www.bing.com/images/search?q=icon||shape="rect"]]

{{lozenge color="blue" arrow="none" icon="https://icon-library.com/images/img_524932.png" width="auto" title="Some vewy pwetty title"}}
ALSDLJDLKJ jhkdaskj kjaskjhdaksj huoquwoeiwqu oidaoiduasoiu oiqwkhlklwqejlk kjldaslasjkldasqw op oiqo[ewq][ kfdskl;fsklj kjl klasd
{{/lozenge}} 

The "link" parameter contains an external url that is stored, for some reason, as a html a tag.

This parameter should also be found in the xwiki macro call.