Addressable::URI interprets the `#` in a URI as a URI fragment
and does not escape it, but Rails has special helpers that treats
these as bona-fide characters that need to be escaped.
Closes https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/23368