Block Editor: Add <base> to Block Canvas Iframe head#56533
Conversation
This allows relative urls to be used in <link>, <a>, <img>, etc.
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
This should fix the issue too right? #55152 |
|
I think it might be best to allow passing a |
|
Ah, tried to search for similar issue/PR but I missed that. Yes, this approach is not very flexible regarding paths or different domains. |
|
Merged in #66751 |
This allows relative paths to work inside a Block Canvas IFrame.
What?
Adding
<base>with the current location to the blob used as a source for the Block Canvas Iframe.Why?
In WordPress that's not an issue but on other projects using the Block Editor component it might be. It is an issue at Drupal Gutenberg.
How?
By adding
<base>with current location, all urls will consider the url from that tag.Testing Instructions
Not really an issue on WordPress but it can been seen at Drupal Gutenberg 3.0.0 Beta.
Testing Instructions for Keyboard
Screenshots or screencast