payload-plugin-newsletter 0.16.7 → 0.16.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/collections.cjs +11 -0
- package/dist/collections.cjs.map +1 -1
- package/dist/collections.js +11 -0
- package/dist/collections.js.map +1 -1
- package/dist/components.cjs +3 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +3 -0
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +3 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -0
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -914,6 +914,9 @@ var EMAIL_SAFE_CONFIG = {
|
|
|
914
914
|
FORBID_ATTR: ["class", "id", "onclick", "onload", "onerror"]
|
|
915
915
|
};
|
|
916
916
|
async function convertToEmailSafeHtml(editorState, options) {
|
|
917
|
+
if (!editorState) {
|
|
918
|
+
return "";
|
|
919
|
+
}
|
|
917
920
|
const rawHtml = await lexicalToEmailHtml(editorState, options?.mediaUrl);
|
|
918
921
|
const sanitizedHtml = DOMPurify.sanitize(rawHtml, EMAIL_SAFE_CONFIG);
|
|
919
922
|
if (options?.wrapInTemplate) {
|