Skip to content

Click Tracking corrupts URLs containing spaces #1220

@DanielStout5

Description

@DanielStout5

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions