Spaces (%20) getting stripped from image URL in Foxy API

Hey guys,

Our image URL has always been https://daks2k3a4ib2z.cloudfront.net/57fa771f45bf29a4636b6816/58890d26fa49297b70b51e7d_Palm%20Fruit%2060%20count%20recurring%20(for%20cart)%20(1).png

Which is properly reflected here:
https://api.foxycart.com/carts/1279369611/items

But not here:
https://api.foxycart.com/carts/1326891742/items

I'm guessing this is a bug. Is it something that can be fixed for existing transactions/carts in the API?

Thanks.
Comments
  • fc_adamfc_adam FoxyCart Team
    @Epotratz,

    Thanks for posting the examples. Looking at the second cart item there - the spaces are still there, but they've been replaced from being the %20 to being an actual space. If you load the image URL in your browser it will still load the image correctly.

    This doesn't appear to be specific to the API though - if you load that same subscription in the admin, and use the advanced edit option, you'll see the spaces there too. From a quick look, I believe 73 of the subscriptions have an image path with a space.

    Doing a bit of digging into recent transactions that had the image path with a space - it shows the user adding the product to the cart with spaces in the image (specifically like Palm+Fruit+60+count+%28for+cart%29+%281%29.png). It looks like they added their product from their email. Looking at a recent order that has one with the %20 instead of spaces, they've added from your website.

    Is there any chance your email client is replacing %20 with +? That appears to be the difference from what I can see - and our systems have converted the + into a normal space character.
  • EpotratzEpotratz Member
    edited October 2017
    @fc_adam

    Good detective work! It looks like it was the Foxycart HMAC encoding tool is swapping out the %20 for + signs. (when using the <!-- link example --> section)

    We'll update our URL's to get the spaces removed so we can avoid the issue.
Sign In or Register to comment.