Skip to content

Preserve custom HTML for unfiltered users in classic editor#229

Open
faisalahammad wants to merge 1 commit intoWordPress:trunkfrom
faisalahammad:master
Open

Preserve custom HTML for unfiltered users in classic editor#229
faisalahammad wants to merge 1 commit intoWordPress:trunkfrom
faisalahammad:master

Conversation

@faisalahammad
Copy link
Contributor

Adds a filter to allow all elements and attributes in TinyMCE for users with the unfiltered_html capability when using the classic editor. This prevents TinyMCE from stripping custom HTML elements when switching between Text and Visual modes, addressing issues for advanced users while maintaining default sanitization for others.

Adds a filter to allow all elements and attributes in TinyMCE for users with the 'unfiltered_html' capability when using the classic editor. This prevents TinyMCE from stripping custom HTML elements when switching between Text and Visual modes, addressing issues for advanced users while maintaining default sanitization for others.
@faisalahammad
Copy link
Contributor Author

Before:

CleanShot 2025-09-09 at 11 28 23@2x

After:

CleanShot 2025-09-09 at 11 28 08@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant