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

CSS characters are not rendered as expected in user macros

      Summary

      When we create a user macro which applies CSS , then characters are not rendered as expected . eg: '>' is rendered as '&gt' and " (quote) is rendered as &quot
      This causes issue with the functionality for the CSS script applied

      Environment

      Confluence 5.9.4

      Steps to replicate
      1. Add a user macro call it "test"
      2. use the below as template
        ##@noparam
        #set($styleHtml="<style type=text/css> .wiki-content > h1 {color:red}</style>")
        $styleHtml
        
      3. Create a test page and add a text as heading 1
      4. add the user macro test
      5. save the page
      Expected result

      The text should appear as red

      Actual result

      The text remains unchaged and when we inspect the element with browser the applied CSS has rendered the character incorrectly > as &gt;

            [CONFSERVER-40873] CSS characters are not rendered as expected in user macros

            Atlassian Update - September 2019

            Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket.

            If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review.

            You can read more about the editor upgrade in the 6.14 Release Notes.

            Thanks

            Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            Makisa Appleton added a comment - Atlassian Update - September 2019 Thank you for your interest in this ticket. The Confluence Server and Data Center team released a major upgrade to the editor in 6.14. Due to the age of this ticket and/or lack of updates, we suspect that this issue is no longer relevant or was resolved as a result of the upgrade and are now closing this ticket. If this issue is still a problem in your Confluence instance in version 6.15 or later, please tag me in your comment and we can reopen this ticket for review. You can read more about the editor upgrade in the 6.14 Release Notes . Thanks Makisa Appleton | Senior Product Manager, Confluence Server and Data Center

            Same issue here on our large enterprise instance (Conf 5.9.10) affecting potentially 190,000 users!

            Since we have plenty of spaces where the CSS macro is used we somehow rely on a working macro and would like to see a higher prio on this issue.

            I guess that fixing this issue will not cost too much time

            Jens Kasperek (Bosch GmbH) added a comment - Same issue here on our large enterprise instance (Conf 5.9.10) affecting potentially 190,000 users! Since we have plenty of spaces where the CSS macro is used we somehow rely on a working macro and would like to see a higher prio on this issue. I guess that fixing this issue will not cost too much time

            I find this a critical bug, as the CSS macro is close to useless without support for ">".

            A workaround I found is to make the CSS file an attachment and refer it from the CSS macro. In this case, Confluence has another problem that it renders the styles extremely late. This means, an unstyled page appears first and then the styles are added. Is this issue known as well?

            Is there any other workaround that you can suggest until this issue is fixed?

            Nirmal Sasidharan added a comment - I find this a critical bug, as the CSS macro is close to useless without support for ">". A workaround I found is to make the CSS file an attachment and refer it from the CSS macro. In this case, Confluence has another problem that it renders the styles extremely late. This means, an unstyled page appears first and then the styles are added. Is this issue known as well? Is there any other workaround that you can suggest until this issue is fixed?

            This also affects the built-in CSS macro in Confluence 5.10.3

            Bastian Schaar added a comment - This also affects the built-in CSS macro in Confluence 5.10.3

              Unassigned Unassigned
              msayed Mizan Ali Sayed (Inactive)
              Affected customers:
              5 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: