[Zope] urlquote?

Marcel Preda marcel@punto.it
Fri, 30 Jun 2000 13:50:11 +0200


>Hi.
>
>Is there a method available somewhere in python to urlquote(?) a string.
>
>Example: lösning -> l%f6sning
>
>/Magnus




in module 'urllib'

quote (string[, safe])
Replace special characters in string using the "%xx" escape. Letters, digits,
and the characters "_,.-" are never quoted. The optional safe parameter
specifies additional characters that should not be quoted -- its default value
is '/'.





quote_plus (string[, safe])
Like quote(), but also replaces spaces by plus signs, as required for quoting
HTML form values. Plus signs in the original string are escaped unless they are
included in safe.

PM