dxa-web-application-dotnet icon indicating copy to clipboard operation
dxa-web-application-dotnet copied to clipboard

BinaryFileManager - StripDimensions UrlDecode ran only when no dimensions

Open bb-ceccles opened this issue 3 years ago • 1 comments

When an image has spaces or special characters there is a difference in how the image handler is working depending on if the image does or doesn't have the image resizing parameters added.

Looking in to the code base the StripDimensions method within the BinaryFileManager does the following

// TSI-417: unescape and only escape spaces path = WebUtility.UrlDecode(path); path = path.Replace(" ", "%20");

But this is only ran when there are not any dimensions. If there are dimensions the path is returned before this is ran.

bb-ceccles avatar May 04 '21 10:05 bb-ceccles

Added a PR for the code change needed for this.

https://github.com/sdl/dxa-web-application-dotnet/pull/85

bb-ceccles avatar May 04 '21 10:05 bb-ceccles