Closed preetmishra closed 4 years ago
@timabbott Thanks for the comment. I have updated the PR with tests.
Merged, thanks @preetmishra! I think ultimately we're going to want some higher-level functions on top of this that take a URL and decode it, with a documented interface, but happy to merge this as progress.
This adds
hash_util_decode()
to decode ahash_util_encode()
[present in zulip/zulip's zerver/lib/url_encoding.py] encoded string.The intent is to facilitate code sharing among various python clients (primarily, Zulip Terminal).
The string replacement before the
unquote
is to recoup for the custom string replacements in zulip/zulip's zerver/lib/url_encoding.py.Conversation link: https://chat.zulip.org/#narrow/stream/127-integrations/topic/Decode.20server.20URLs/near/977374