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.
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:
/asset
folder and referenced from the patternSince 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.