Skip to content

Remove urlencode from srcset calculation function#211

Merged
Sidsector9 merged 1 commit into10up:developfrom
hugosolar:feature/remove-urlencode-from-image-name
Dec 21, 2023
Merged

Remove urlencode from srcset calculation function#211
Sidsector9 merged 1 commit into10up:developfrom
hugosolar:feature/remove-urlencode-from-image-name

Conversation

@hugosolar
Copy link
Copy Markdown
Contributor

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 a team and rickalee 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
Copy Markdown
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
Copy Markdown
Member

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

Copy link
Copy Markdown
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
@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.

5 participants