scrub invalid data in URIs