-
Notifications
You must be signed in to change notification settings - Fork 583
Description
Sending an email via SendGrid with a link or image to a URL that contains a space does not work, e.g.:
<a href="https://immediac.blob.core.windows.net/simplecmsexampleshop/immediacLogoWhite-App (1).png">Link to File</a>
The SendGrid click tracking redirects to https://immediac.blob.core.windows.net/simplecmsexampleshop/immediacLogoWhite-App+(1).png
- note that the space has been replaced with a plus (+), which resolves to a 404 error page.
+ is not a valid replacement for space in the URL path, only in the query string. In the path it should be replaced with %20. The url should be this, which does resolve to the file:
https://immediac.blob.core.windows.net/simplecmsexampleshop/immediacLogoWhite-App%20(1).png
We worked around this by encoding the URLs (with %20) on our side before sending the emails, but I think it would make sense for SendGrid to do the correct encoding to prevent this issue for others in the future.