-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.13.0, 8.5.0
-
1
-
Severity 3 - Minor
-
0
-
Issue Summary
This is reproducible on Data Center: yes
This affects all version of Confluence.
When a user adds the code macro to a page in Confluence DC page, it imports the JavaScript in shCore.js, which overloads the
- RegExp.prototype.apply
- RegExp.prototype.call
- RegExp.prototype.exec
- RegExp.prototype.test
- String.prototype.match
- String.prototype.replace
- String.prototype.split
functions (at a minimum). This causes issues with any other code that uses these functions as they are not equivalent to the default functions.
This is specific to the confluence-newcode-macro-plugin.
Steps to Reproduce
- Create a page in Confluence Server DC
- Add a code macro, this will bring in the minified JavaScript from shCore.js
- Add another macro that has a dependency on one of the overloaded functions
Expected Results
The page loads without issue.
Actual Results
The page may become unresponsive, or the second macro fails to run.
Workaround
Remove the code macro from pages that have other macros that rely on correct functioning of RegExp