Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

url_encoding: Skip unnecessary encode before quote.

Anders Kaseorg3c663e48dbb3
diff --git a/zerver/lib/url_encoding.py b/zerver/lib/url_encoding.py
index 6c8058b90f5..6f8f36a961a 100644
--- a/zerver/lib/url_encoding.py
+++ b/zerver/lib/url_encoding.py
@@ -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.