Strip trailing whitespaces in submodule URLs
Users attempting to access repositories that had .gitmodules
entries with trailing whitespaces would encounter an Error 500. This was due
to a change in bf876ec7 that removed the whitespace stripping.
Closes #33018 (closed)