The space has to be added somewhere. Are you sure it isn't in the original url? If I could see the actual code on the pages I could probably find it.
There is a space somewhere... either in the url, where the session is set, or where it is written.