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

HTML Script elements with content of length greater than 4000 characters, are corrupted when rendered within a Macro

    XMLWordPrintable

Details

    Description

      Issue Summary

      HTML Script elements with content of length greater than 4000 characters, are corrupted when rendered within a Macro.

      Steps to Reproduce

      1. Create a plugin
      2. Implement a macro which renders a Velocity file
      3. Embed <script> element in Velocity file
      4. Ensure script element content is greater than 4000 characters
      5. Install plugin
      6. Create a page and add the macro

      Expected Results

      Script executes in browser.

      Actual Results

      Browser throws syntax error as content is split into 4000 character chunks surrounded by <![CDATA[}} and {{]]>.

      Workaround

      Split >4000 character scripts into multiple <4000 character scripts.

      OR

      Type // and add a newline before every 4000th character so the insertion of ]]><![CDATA[ does not corrupt your script.

      Attachments

        Issue Links

          Activity

            People

              854eef6f5746 Kusal Kithul-Godage
              854eef6f5746 Kusal Kithul-Godage
              Votes:
              3 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: