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

Removed unnecessary filter rejecting unsafe URLs #588

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

pbking
Copy link
Contributor

@pbking pbking commented Apr 24, 2024

It seems that the filter to allow unsafe URLs was unnecessary. I believe it was added to get the plugin to work as expected in a docker container (wp-env) and another solution was ultimately used to make that work anyway.

With this filter removed there should be no more problems as described in #584

Fixes #584

NOTE: I was unable to reproduce this with the steps provided in #584. However I'm sure it could be triggered given the function could be constructed multiple times with that logic.

To Test:

  • Edit a template with media to be saved. (For example add an image block to the index template)
  • Save the template
  • Save the theme (make sure "Localize Images" is selected).
  • Note that the image asset is saved in the /asset folder and referenced from the pattern

Since this was originally added to support the plugin in a docker environment (wp-env) that environment was used to verify that it is working as expected.

Copy link
Member

@vcanales vcanales left a comment

Choose a reason for hiding this comment

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

Works as advertised; tested on localhost and with a local domain (wp.local)

@pbking pbking merged commit 05acf3c into trunk Apr 24, 2024
2 checks passed
@pbking pbking deleted the fix/redeclare-turn_off_reject_unsafe_urls branch April 24, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Error saving theme due to turn_off_reject_unsafe_urls()
2 participants