mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
url_encoding: Skip unnecessary encode before quote.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
df10b306a6
commit
3c663e48db
@@ -11,7 +11,7 @@ def hash_util_encode(string: str) -> str:
|
||||
# frontend.
|
||||
# `safe` has a default value of "/", but we want those encoded, too.
|
||||
return urllib.parse.quote(
|
||||
string.encode("utf-8"), safe=b"").replace(".", "%2E").replace("%", ".")
|
||||
string, safe=b"").replace(".", "%2E").replace("%", ".")
|
||||
|
||||
def encode_stream(stream_id: int, stream_name: str) -> str:
|
||||
# We encode streams for urls as something like 99-Verona.
|
||||
|
||||
Reference in New Issue
Block a user