fix: self-closing script tag fixed for TinyMceEditor (#2608) (backport)

This commit is contained in:
Muhammad Arslan
2025-11-07 22:42:32 +05:00
committed by GitHub
parent de8b4b460b
commit bd00c3b271

View File

@@ -457,6 +457,9 @@ 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 self-closing <script /> tags from being mangled,
// to preserve backwards compatibility with content that relied on this behavior
protect: [/<script[^>]*\/>/g],
},
};
};