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

Remove urlencode from srcset calculation function #211

Merged

Conversation

hugosolar
Copy link

Description of the Change

This change fixes an issue with URLencoding we've seen in our sites. Blob URLs are being encoded in the windows_azure_storage_wp_calculate_image_srcset function which causes wrong URLs when displaying those in the browser.

Screenshot 2023-12-11 at 09 59 02

Removing those encoding, fixes the issue and return a valid URL

How to test the Change

  • Upload an image to the blob storage
  • Display the image in the frontend using wp_get_attachment_image. This will cause, the plugin hooks in through the wp_calculate_image_srcset filter

Changelog Entry

Fixed - Bug fix

Credits

Props @hugosolar

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@hugosolar hugosolar requested review from rickalee and a team as code owners December 11, 2023 13:07
@hugosolar hugosolar requested review from ravinderk and removed request for a team December 11, 2023 13:07
@hugosolar hugosolar self-assigned this Dec 11, 2023
@rickalee
Copy link
Collaborator

Looks good and tested on staging environment. Please proceed with workflow for release @jeffpaul

@jeffpaul jeffpaul added this to the 4.5.0 milestone Dec 11, 2023
@Sidsector9
Copy link
Member

@hugosolar thanks for the PR. An E2E test is failing, can you please have a look?

Copy link
Member

@Sidsector9 Sidsector9 left a comment

Choose a reason for hiding this comment

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

✅ E2E tests are passing
✅ PR tests well 👍 , approving.

@Sidsector9 Sidsector9 merged commit e0aaeff into 10up:develop Dec 21, 2023
9 of 12 checks passed
@dkotter dkotter modified the milestones: 4.5.0, 4.4.1 Jan 5, 2024
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.

None yet

5 participants