From 5ec3126159adebea2bf07dc84c8dcd178bdf1a3a Mon Sep 17 00:00:00 2001 From: Muhammad Arslan Abdul Rauf Date: Mon, 6 Oct 2025 20:10:08 +0500 Subject: [PATCH 1/3] fix: self-closing script tag fixed for TinyMceEditor --- src/editors/sharedComponents/TinyMceWidget/hooks.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/editors/sharedComponents/TinyMceWidget/hooks.ts b/src/editors/sharedComponents/TinyMceWidget/hooks.ts index f89f1320ad..5536982497 100644 --- a/src/editors/sharedComponents/TinyMceWidget/hooks.ts +++ b/src/editors/sharedComponents/TinyMceWidget/hooks.ts @@ -457,6 +457,7 @@ export const editorConfig = ({ valid_elements: '*[*]', // FIXME: this is passing 'utf-8', which is not a valid entity_encoding value. It should be 'named' etc. entity_encoding: 'utf-8' as any, + protect: [/\]*\/\>/g], // protect self-closing script tags from being mangled }, }; }; From 01166118a9ac62d26f94f0906fb30ef3d9958f2e Mon Sep 17 00:00:00 2001 From: Muhammad Arslan Abdul Rauf Date: Thu, 6 Nov 2025 02:44:42 +0500 Subject: [PATCH 2/3] fix: remove unnecessary escape characters --- src/editors/sharedComponents/TinyMceWidget/hooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editors/sharedComponents/TinyMceWidget/hooks.ts b/src/editors/sharedComponents/TinyMceWidget/hooks.ts index 5536982497..d6e902097e 100644 --- a/src/editors/sharedComponents/TinyMceWidget/hooks.ts +++ b/src/editors/sharedComponents/TinyMceWidget/hooks.ts @@ -457,7 +457,8 @@ export const editorConfig = ({ valid_elements: '*[*]', // FIXME: this is passing 'utf-8', which is not a valid entity_encoding value. It should be 'named' etc. entity_encoding: 'utf-8' as any, - protect: [/\]*\/\>/g], // protect self-closing script tags from being mangled + // Protect self-closing