[Zope] url_quote is trashing my URL, Help
Jonothan Farr
jfarr@real.com
Fri, 19 Nov 1999 12:04:55 -0800
> Hi,
> I am trying to call mapquest maps. If I don't use url_quote to format my
> string, I loose the spaces and I don't get the correct map. When I use
> url_quote it converts everything, including the '&' character. It produces
> the following string:
> http://www.mapquest.com/cgi-bin/ia_free%3fwidth%3d400%26height%3d300%26stree
> taddress%3d3850%20Pecan%20Lane%20%26city%3dLas%20Vegas%26state%3dNV
>
> This url fails to bring up a page at all, at least the one with spaces sort
> of worked. What is the problem?
> I tried to use translate() to convert all the spaces to %20, but I cannot
> determine how to use the translate function.
translate() only translates single characters into other single characters.
Try string.replace(url, ' ', '%20'). Not sure why url_quote doesn't work
correctly.
-jfarr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~