Deal with malformed URLs.