-
Bug
-
Resolution: Fixed
-
High
-
8.2.0, 8.0.4
-
4
-
Severity 3 - Minor
-
6
-
Issue Summary
Macro HTML bodies longer than 64k characters may exhibit split CDATA sections and/or JavaScript elements.
Steps to Reproduce
- Create a plugin
- Implement a macro which renders a Velocity file
- Embed one or more <script> elements in Velocity file
- Ensure evaluated HTML body is greater than 64k characters, and that roughly the 64kth character falls within a script element or CDATA section
- Install plugin
- Create a page and add the macro
Expected Results
Script executes in browser.
Actual Results
Browser throws syntax error as content is split into multiple CDATA sections surrounded by <![CDATA[ and ]]>.
Workaround
Add some dummy HTML around the 64kth character (i.e. right before the corrupted script element or CDATA section), such as:
<span dummy="dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal dummyVal"></span>
- follows
-
CONFSERVER-81454 HTML Script elements with content of length greater than 4000 characters, are corrupted when rendered within a Macro
- Closed
- is duplicated by
-
CONFSERVER-82558 CDATA tags are randomly inserted into JavaScript code generated on pages with Confifroms plugin after upgrading to Confluence 8 versions breaking the page functionality
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...