fix url encoding in the param part (#2520)

This commit is contained in:
Shuchang Zheng
2025-05-29 12:55:48 -07:00
committed by GitHub
parent 401729fb12
commit 62e9d84fd6
3 changed files with 30 additions and 0 deletions

View File

@@ -65,4 +65,5 @@ def encode_url(url: str) -> str:
parts = list(urlsplit(url))
# Encode the path while preserving "/" and "%"
parts[2] = quote(parts[2], safe="/%")
parts[3] = quote(parts[3], safe="=&/%")
return urlunsplit(parts)