Salesforce has introduced a "blocklist" filter feature to protect organizations from Cross-Site Scripting (XSS) vulnerabilities in HTML email templates. Cross-Site Scripting (XSS) refers to a type of security vulnerability where malicious code is injected into web content to execute unauthorized actions. This feature prevents an HTML email template from being saved if it includes tags and attributes that are known to be XSS vectors, such as JavaScript event handlers.
The blocklist feature also prevents the use of such email templates by end users and automated processes such as workflow rules and change sets. The feature does not affect text or custom email templates.
The following types of HTML content are flagged by the Salesforce HTML editor as potential XSS vectors:
See also
Create Custom HTML Email Templates in Salesforce Classic
Create an Email Template in Lightning Experience
This article explains how to identify and remove Cross-Site Scripting (XSS) vectors from Salesforce HTML email templates to resolve the "active content" save error. Administrators must edit the template and remove any XSS vectors before the template can be saved and used.
Open the HTML email template in the Salesforce template editor. Review the HTML source for any JavaScript event handlers, JavaScript-based SRC attributes, or base64 image data. Delete these elements from the template. After saving, test the template to confirm full functionality.
Workbench is a free, open-source utility for interacting with Salesforce APIs. It is available to organizations with API access enabled.
To use Workbench:
Another effective approach is to copy the contents of the problematic HTML template and paste them into a brand new template. The copy-and-paste operation preserves formatting such as images, fonts, and colors, but removes the XSS code. You can also paste the content into a plain text editor first, then paste back into the new template to strip all formatting.
In some cases, browser extensions or the browser itself may be injecting external code into the template editor. Try disabling all browser extensions or using an incognito (private) browser window to see if this resolves the error. A quick audit of your organization's setup may also be needed.
Note: There may be some loss of functionality in the cleaned template, so thorough testing is strongly advised before making the template available to users or automated processes.
000387065

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.