Make the CKEditor GeneralHtmlSupport allow list configurable (rel-11_0 backport, #5897) - #5901
Open
Lucsaan wants to merge 2 commits into
Open
Conversation
added 2 commits
July 21, 2026 14:15
The htmlSupport allow list was hardcoded in Core.UI.RichTextEditor.js (span, cite, style, table). Everything else loses attributes, classes and inline styles that no active editor feature handles — for example a border style on an image is silently stripped, with no way to change that from the outside. Move the element list to the new SysConfig settings Frontend::RichText::HtmlSupportAllowedElements and CustomerFrontend::RichText::HtmlSupportAllowedElements (default keeps the current behavior) and pass it to the editor via the RichText JS data.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #5900 to
rel-11_0— see #5897 for the full rationale.Summary
Moves the hardcoded
htmlSupportallow list (span,cite,style,table) fromCore.UI.RichTextEditor.jsinto the new SysConfig settingsFrontend::RichText::HtmlSupportAllowedElements/CustomerFrontend::RichText::HtmlSupportAllowedElements. Defaults keep the current behavior; administrators can extend the list (e.g. addimgso image border styles survive) without code changes.Identical change as the
rel-11_1PR, re-applied on top ofrel-11_0(the surroundingFrontend::CKEditorPlugins/Frontend::EnhancedCKEditorToolbarsettings do not exist here, the new settings are placed afterFrontend::RichText::EnhancedMode::Customer).