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

XMLWordPrintable

    • Severity 3 - Minor
    • 1

      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.

            Assignee:
            Kusal Kithul-Godage
            Reporter:
            Kusal Kithul-Godage
            Votes:
            3 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: