Handle slugs that need encoding

Before this change, slugs that needed encoding (eg /info/""<--) raised exceptions. Such
slugs can be requested by malicious attempts or when a user mistypes the URL.