Ah, didn't see that substring error... You're right.
Done.

The reason I think we should not clean up is that users may
write URL's "manually" and I think that should be ok. We do clean up when formatting. Besides, the java URI also accepts unclean input and Git URL parsing also does it.