Rescue bad URI.parse by trying to parse after encoding