Fix python 3 support for web.haste and web.isgd

Don't encode url, and be sure to encode text.