Custom HTML Block Preview doesn't respect unfiltered_html capability #38212
Labels
[Block] HTML
Affects the the HTML Block
Needs Technical Feedback
Needs testing from a developer perspective.
[Type] Bug
An existing feature does not function as intended
Description
When a user lacks the unfiltered_html capability, they cannot use tags such as 'iframe' in their posts. A very common situation where users lack unfiltered_html is anyone but Network Administrators in a MultiSite.
However, then using a Custom HTML block, these users can still have their unfiltered_html rendered in the Preview of the block. This is, at a minimum, a poor User Experience situation because the Block Preview shows something that they front end simply won't. (It likely has security concerns as well.)
Note that while simply only rendering the filtered HTML would be an improvement, I think an even better approach would be displaying a warning alongside the preview that indicates that some content has been removed or modified.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
5.8.3 MultiSite (no Gutenberg plugin installed)
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: