Patch incorrect use of url encoder (encodes url parameters, not urls!).
Needs to be completely replaced.