imgix / react-imgix

React component to display imgix images
https://www.npmjs.com/package/react-imgix
Other
360 stars 64 forks source link

`disablePathEncoding` in `buildUrl` does not work #949

Closed paulyi closed 1 month ago

paulyi commented 4 months ago

Before you submit:

Describe the bug The third set of parameters to buildUrl, which include disablePathEncoding, are not being forwarded to the underlying buildUrl call and therefore not taking effect.

To Reproduce Steps to reproduce the behaviour:

  1. Call buildUrl with a URL containing spaces in the path
  2. Pass in { disablePathEncoding: true } as the third option to buildUrl
  3. It returns an encoded URL

Expected behaviour Result should not be encoded

Screenshots If applicable, add screenshots to help explain your problem.

Information: react-imgix: 9.8.1

Additional context It seems like the third set of options passed into buildUrlPublic is never forwarded onto the constructUrl call.

https://github.com/imgix/react-imgix/blob/main/src/constructUrl.js#L160

arno-fukuda commented 1 month ago

Thank you for calling this out.

{ disablePathEncoding: true } should now work properly in v9.8.2.