dynamicweb / Swift

Dynamicweb Swift is a plug-and-play standard solution for Dynamicweb Ecommerce which allows you to create beautiful mobile-friendly Ecommerce websites with minimal effort and almost no coding with awesome performance, wcag support and much more...
https://doc.dynamicweb.com/swift
GNU General Public License v3.0
21 stars 17 forks source link

Encoding image URLs for files or folders with a space results in broken image links #31

Open Imar opened 3 weeks ago

Imar commented 3 weeks ago

A few templates in Swift (at least Swift_ProductDetailsImage.cshtml and Swift_ProductDetailsGallery.cshtml) use this code;:

string imageLinkPath = Dynamicweb.Context.Current.Server.UrlEncode(imagePath);

The imageLinkPath is then assigned to an href: <a href="@imageLinkPath" ...

When the image URL contains a space, the link ends up broken (the space becomes a +) leading to 404 images. Normally, you don't see these as the link is intercepted by the slider. However, Google and other tools report them as broken links.

Can this be fixed?

Imar

nicped commented 2 weeks ago

Sounds like a bug.

Added a fix here: https://dev.azure.com/dynamicwebsoftware/Dynamicweb/_workitems/edit/20158