Issue
- Disable the ability to add JavaScript to pages on DXP 7.0 and thus prevent malicious code injections.

Environment
- DXP 7.0 Fix Pack 60+
- This functionality was introduced in DXP 7.0 Fix Pack 60
Resolution
- Install DXP 7.0 Fix Pack 60 or higher.
- In the portal-ext.properties, add the following properties -
-
field.enable.com.liferay.portal.kernel.model.Layout.javascript=false -
field.enable.com.liferay.portal.kernel.model.LayoutSet.javascript=false - Start the application server.
- Navigate to the Configure Page menu by clicking Control Panel > Navigation > 3-dot icon > Configure Page next to any page (public or private).
At this point, the ability to add JavaScript is no longer available.
