Embeds: Incorrect URL basename logic in EmbedPreview
#60248
Labels
[Block] Embed
Affects the Embed Block
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The
EmbedPreview
component can display a message such asEmbedded content from %s can't be previewed in the editor.
It uses the embedded URL's hostname for that, but does so poorly, causing the message to be quite weird and inconsistent.
Two suggestions:
new URL(..).origin
rather thansplice()
etc. to make the URL fallback more consistentStep-by-step reproduction instructions
previewable
attribute tofalse
Screenshots, screen recording, code snippet
Environment info
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: