Uploaded attachments within issues return a 404 - space in url not rendered properly

Attachments with spaces in the URL are not rendered and returns a 404. A similar issue was fixed in wiki attachments on this issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/51196

ZD: https://gitlab.zendesk.com/agent/tickets/106984

I won't call this a bug but it would be great if we can fix this.

cc// @DouweM