Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-4920

Color tags surrounding a link are not rendered correctly by WYSIWYG

      The following markup is not converted correctly between markup and XHTML (and back again):

      {color:red}[Some link]{color}

      The XHTML generated by the renderer places font tags around the "a" (link) tags, but JTidy moves the font tags inside of the "a" tags when the XHTML is passed through it. This needs to be fixed somehow... However, it may cause problems with CONF-4919, where the renderer would expect the font tags to be inside the "a" tags as well.

      Below is the output of the test case (currently commented out in TestSimpleMarkup):

      Expected:{color:red}[Some link]{color}
      Actual :[Some link]

            [CONFSERVER-4920] Color tags surrounding a link are not rendered correctly by WYSIWYG

            JoeyA added a comment - - edited

            Colour tags are no longer displayed when editing since Wiki markup has been removed.
            The colour of links can now be changed in RTE by highlighting the link and selecting the desired colour (for anonymous as well as registered users)

            JoeyA added a comment - - edited Colour tags are no longer displayed when editing since Wiki markup has been removed. The colour of links can now be changed in RTE by highlighting the link and selecting the desired colour (for anonymous as well as registered users)

            Jeremy Largman added a comment - As a workaround try a user macro: http://confluence.atlassian.com/display/CONFEXT/Link+with+colour

            Don Willis added a comment -

            Okay, that's pretty weird. There are two problems here.
            One is a completely separate problem: When anonymous users create a link on a new page, it is interpreted as an error link. I've created CONF-13720 for this.
            Secondly, when a link that renders as an error link is surrounded by a color tag, as in Mark's example, or by putting syntax errors into the link, the color tag will be lost during round trip.

            Error links seem to me to be a sufficiently large subset of links that I agree this issue should not be closed.

            Don Willis added a comment - Okay, that's pretty weird. There are two problems here. One is a completely separate problem: When anonymous users create a link on a new page, it is interpreted as an error link. I've created CONF-13720 for this. Secondly, when a link that renders as an error link is surrounded by a color tag, as in Mark's example, or by putting syntax errors into the link, the color tag will be lost during round trip. Error links seem to me to be a sufficiently large subset of links that I agree this issue should not be closed.

            This has only been fixed for logged in users. For anonymous users the issue still exists as originally described:

            • Enable anonymous access, and log out of Confluence
            • Add Page as an anonymous user
            • Paste the following into the Wiki Markup tab:
            {color:red}[Some link]{color}
            
            • Switch from Wiki to RTE and back
            Expected:{color:red}[Some link]{color}
            Actual :[Some link]
            

            Mark Hrynczak (Inactive) added a comment - This has only been fixed for logged in users. For anonymous users the issue still exists as originally described: Enable anonymous access, and log out of Confluence Add Page as an anonymous user Paste the following into the Wiki Markup tab: {color:red}[Some link]{color} Switch from Wiki to RTE and back Expected:{color:red}[Some link]{color} Actual :[Some link]

            Fixed in atlassian-renderer

            Don Willis added a comment - Fixed in atlassian-renderer

            Cheryl Jerozal [Atlassian] added a comment - http://developer.atlassian.com/jira/browse/BASICMACROS-5

            Agnes Ro added a comment -

            This problem now only occurs if you have an alias in the link.

            Agnes Ro added a comment - This problem now only occurs if you have an alias in the link.

            Tom Davies added a comment - - edited

            The particular case given now works (2.1.3), but this doesn't:

            {color:red}[xxx|Some link]{color} -- it becomes {color:red}[{color:red}xxx{color}|Some link]{color} 
            

            after a round trip. So we'll keep this open.

            edited - added noformat around the markup

            Tom Davies added a comment - - edited The particular case given now works (2.1.3), but this doesn't: {color:red}[xxx|Some link]{color} -- it becomes {color:red}[{color:red}xxx{color}|Some link]{color} after a round trip. So we'll keep this open. edited - added noformat around the markup

              smansour Sherif Mansour
              8d92d19feb5e Jeremy Higgs
              Affected customers:
              4 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: