Changed url encoding to one that will always work

Back in chapter 6, we were told to write our own encoding method, however the same of that encoding method was not specified, it might not always be "encode_url".