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

CSS characters are not rendered as expected in user macros

    XMLWordPrintable

Details

    Description

      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;

      Attachments

        Activity

          People

            Unassigned Unassigned
            msayed Mizan Ali Sayed (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: