Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix font paths in iframed editor #4759

Conversation

ironprogrammer
Copy link

@ironprogrammer ironprogrammer commented Jun 29, 2023

Merge fix from Fonts API: WordPress/gutenberg#51178. To summarize:

The font asset files are not being loaded within an iframe. Why? The relative URL to the asset files are relative to the iframe's WordPress/gutenberg#50875 was merged. By making the URLs absolute, it ensures each font asset file does properly relate to the actual location of the files.

Trac ticket: https://core.trac.wordpress.org/ticket/58672


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@ndiego
Copy link
Member

ndiego commented Jul 3, 2023

This works as expected. Thanks @ironprogrammer 💪

Copy link

@anton-vlasenko anton-vlasenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on Friday, and I can confirm that this pull request resolves the issue with relative URLs by converting them into absolute URLs.
Consequently, font URLs can now be loaded from the iframe context.
The code LGTM.

@audrasjb
Copy link
Contributor

audrasjb commented Jul 5, 2023

committed in https://core.trac.wordpress.org/changeset/56139

@audrasjb audrasjb closed this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants