-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
None
-
Affects Version/s: 5.9.4, 5.9.7
-
Component/s: Macros - Other Macros
-
3
-
Severity 3 - Minor
Summary
Rendering Javascript from an HTML macro in a Confluence page breaks the edit functionality
Environment
- Confluence 5.9.4
- Chrome, Firefox, Safari
Steps to Reproduce
- In a space with the default theme:
- Enable the HTML macros
- Add the following code inside of the macro
<!-- TradingView Widget BEGIN --> <script type="text/javascript" src="https://s3.amazonaws.com/tradingview/tv.js"></script> <script type="text/javascript"> new TradingView.widget( { "width": 862, "height": 250, "symbol": "NASDAQ:TEAM", "interval": "D", "toolbar_bg": "#E4E8EB", "hide_top_toolbar": true, "allow_symbol_change": true, "save_image": false } ); </script> <!-- TradingView Widget END -->
- Save the page
- Edit the page
You can also try the following, which breaks the editor in a different way:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js">
</script>
Expected Results
Page is editable and you can change the code within the macros
Actual Results
Instead of taking you to the editor, Confluence displays the same URL to view the page, and it shows the JavaScript macro in a page. You cannot edit the page this way.
Thing I've tried
Place the code in an HTML macro within the 'Excerpt' macro in another page, then include this excerpt in your target page. This still breaks the editor.
Place the JS code in a user macro, then add that user macro to a page. This breaks the editor too.
Workaround
- Use the Documentation theme. However, this is deprecated currently in Confluence.
- You can also access the edit view for that page directly: http://baseURL/pages/editpage.action?pageId=<ID OF THE PAGE>
- mentioned in
-
Page Loading...