Email template does not resize in Google Chrome due to CSP directive script-src
Last updated 2022-02-10 ·Reference W-3822718 ·Reported By 0 users
The email template HTML Preview window for Custom HTML templates does not resize like it should in Google Chrome for My Domain sandbox orgs when the Sandbox name contains capital letters. The error in the Browser Dev tools Console is similar to the following:
Error: "Refused to load the script 'https://<domain--sandboxname.cs59.my.salesforce.com>/email/wysiwyg/resize.js' because it violates the following Content Security Policy directive: "script-src https://domain--SANDBOXNAME.cs59.my.salesforce.com"."
1) Open Chrome
2) Login to a Sandbox org with My Domain enabled and which has at least one capital letter in the name and has Email Templates
3) Go to Setup > Communication Templates > Email Templates
4) Click the 'New Template' button
5) Select 'Custom (without using Letterhead)' and click 'Next'
6) Click the 'Available For Use' checkbox and enter an 'Email Template Name' and click 'Next'
7) Enter a Subject in the 'Subject' field and enter sample HTML code into the 'HTML Body' field, then click 'Next'
8) Click 'Save' on the 'Step 4. Create text-only version' page
Actual Results: The HTML Preview window shows only a small portion of the full template and the browser developer tools console displays the CSP error noted above
Expected Results: The HTML Preview window should show the full email template as it does in IE and Firefox and in other orgs that are non-sandbox or don't have the criteria specified above in the description
1) Use a supported browser other than Chrome
2) Save the Email Template, then open the Email Template from Setup, click the 'Edit HTML Version' button and then click the 'Preview' button to see the full HTML Email Template
3) Don't use capital letters in the Sandbox name when creating a Sandbox which has MyDomain
Reported By (0)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.