From 206879614c9bd43dea73f614c1d29248c7533ca7 Mon Sep 17 00:00:00 2001 From: Tunglies Date: Thu, 14 Mar 2024 12:42:22 +0800 Subject: [PATCH] Fix httpx is not encoding with symbol '%s' (#3140) --- httpx/_urlparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpx/_urlparse.py b/httpx/_urlparse.py index 232269ee4d..d3f8c88af0 100644 --- a/httpx/_urlparse.py +++ b/httpx/_urlparse.py @@ -424,7 +424,7 @@ def is_safe(string: str, safe: str = "/") -> bool: """ Determine if a given string is already quote-safe. """ - NON_ESCAPED_CHARS = UNRESERVED_CHARACTERS + safe + "%" + NON_ESCAPED_CHARS = UNRESERVED_CHARACTERS + safe # All characters must already be non-escaping or '%' for char in string: