• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 6.2, (32)
      6.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.0.5, 6.0.6, 6.1.0, 6.0.7, 6.1.1, 6.2.0, 6.1.2, 6.1.3, 6.1.4, 6.2.2, 6.2.3, 6.2.4, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.4.0, 6.5.0, 6.4.1, 6.4.2, 6.4.3, 6.5.1, 6.5.2, 6.6.0, 6.6.1, 6.6.2, 6.7.0
    • Macros - Other Macros
    • None

      Starting in Confluence 6, User Macros which contain a "target" tag have that tag removed when used on a page. The same sort of target tag worked in 5.10.8 and prior. A common use for this type of macro is to allow creating links that open in a new tab. Here is an example User Macro: 

      ## Macro title: Link in Tab
      ## Macro has a body: N
      ## Body processing: Selected body processing option
      ## Output: Selected output option
      ## This is an example macro
      ## @param 0:title=Link Text|type=string|required=true|desc=Link title text
      ## @param 1:title=Link URL|type=string|required=true|desc=Any link URL (not intended for Wiki links)
      
      <a href="$param1" target="_blank">$param0</a>

       

      If you view the HTML generated in 5.10.8 when using this macro, the target tag is clearly there. In Confluence 6 and later, the HTML does not contain the target tag. Issue occurs no matter what the actual target is. The target portion of the HTML is always stripped out in Confluence 6 and later.

       

      Steps to Reproduce:

      1. Create a new User Macro using the HTML above.
      2. Use this macro on a page to create a link.
      3. After saving the page, click the link and note that it does not open in a new tab.
      4. View the source for the page and observe that there is no target tag.
      5. Repeat the above steps in Confluence 5.10.8 or earlier and observe that the link opens in a new tab, and the HTML for the page includes the target tag.

       

            [CONFSERVER-54958] Confluence 6 and later User Macro strips out target tag

            Same need for us

            Yvan Le Texier added a comment - Same need for us

            Doug added a comment -

            We finally were able to upgrade from 5.10.4 to 6.10.0 about 30 days ago. Today I stumbled across this problem with our existing user-macros to open URLs in new tabs/windows. If the target tag was stripped for security reasons, then please provide an alternative. Opening in new tabs/windows allows users to not lose their place on large Confluence pages or be required to render a long loading page again.

            Doug added a comment - We finally were able to upgrade from 5.10.4 to 6.10.0 about 30 days ago. Today I stumbled across this problem with our existing user-macros to open URLs in new tabs/windows. If the target tag was stripped for security reasons, then please provide an alternative. Opening in new tabs/windows allows users to not lose their place on large Confluence pages or be required to render a long loading page again.

              Unassigned Unassigned
              jkennemer Jonathon
              Affected customers:
              21 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated: