block-components
block-components copied to clipboard
The content picker display html code as title for some edge cases
Describe the bug
The content picker uses the title.rendered property from the REST-API to render the title on the PickedItemPreview component.
This title.rendered property might contain HTML code depending on which plugin/theme is used. This HTML markup is then shown as plaintext to the user.
I think we should either render that html using dangerouslySetInnerHTML or we should use the title.raw instead of the title.rendered.
Steps to Reproduce
- Register a custom filter to the
the_title()that adds html markup to the title - Select a post on the post picker
- You will see the html markup being displayed as plaintext.
Screenshots, screen recording, code snippet
Environment information
No response
WordPress information
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct