Ensure URIs can be parsed by URI.parse

In the unlikely event that URI.parse is too restrictive, we'd rather err on the side of data quality instead of being overly permissive.

This resolves an issue where underscores in hostnames were being incorrectly permitted during validation.