Description
The issue boils down to roles without the unfiltered_html capability trying to embed PDFs from third-party websites. The PDF embed preview shows correctly in the gutenberg editor (initially), however when viewing the saved page it only shows the link to the PDF. The embed is missing. Additionally when refreshing the editor the block rendering the "invalid or unexpected content" error.
Step-by-step reproduction instructions
- Install a plugin such as WP offload media or similar so that a PDF can be housed off-site. Alternatively reference an external PDF directly in the file block.
- Add a new user and assign them the author role. The author role does not have the
unfiltered_html capability.
- Add a new post as the author.
- Add a file block and reference the external PDF.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
The issue boils down to roles without the
unfiltered_htmlcapability trying to embed PDFs from third-party websites. The PDF embed preview shows correctly in the gutenberg editor (initially), however when viewing the saved page it only shows the link to the PDF. The embed is missing. Additionally when refreshing the editor the block rendering the "invalid or unexpected content" error.Step-by-step reproduction instructions
unfiltered_htmlcapability.Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.