diff options
| author | Caleb Brown <git@calebbrown.id.au> | 2012-04-19 13:07:05 +1000 |
|---|---|---|
| committer | Caleb Brown <git@calebbrown.id.au> | 2012-04-19 13:07:05 +1000 |
| commit | b373b48ab363fea2195d00f4e2a91cc77315f2a0 (patch) | |
| tree | d78f659894c6f1b655788d4a5a68b573e4a05589 | |
| parent | a0f10d6455ee285d713dee34e99131cdc6ab0b95 (diff) | |
| download | oauthlib-b373b48ab363fea2195d00f4e2a91cc77315f2a0.tar.gz | |
Add comment indicating why we need "safe='~'" in the call to urllib.quote.
| -rw-r--r-- | oauthlib/oauth1/rfc5849/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/oauthlib/oauth1/rfc5849/utils.py b/oauthlib/oauth1/rfc5849/utils.py index 786fa2e..6737e90 100644 --- a/oauthlib/oauth1/rfc5849/utils.py +++ b/oauthlib/oauth1/rfc5849/utils.py @@ -98,6 +98,8 @@ def escape(u): """ if not isinstance(u, unicode): raise ValueError('Only unicode objects are escapable.') + # Letters, digits, and the characters '_.-' are already treated as safe + # by urllib.quote(). We need to add '~' to fully support rfc5849. return urllib.quote(u.encode('utf-8'), safe='~') |
