handle resource IDs with special characters

A resource ID that looks like a SHA1 value can be used in the URI.