RWS / dxa-web-application-dotnet

SDL Digital Experience Accelerator .NET MVC web application
Apache License 2.0
19 stars 35 forks source link

BinaryFileManager - StripDimensions UrlDecode ran only when no dimensions #84

Open bb-ceccles opened 3 years ago

bb-ceccles commented 3 years ago

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 commented 3 years ago

Added a PR for the code change needed for this.

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