mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +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.
 | 
					    # frontend.
 | 
				
			||||||
    # `safe` has a default value of "/", but we want those encoded, too.
 | 
					    # `safe` has a default value of "/", but we want those encoded, too.
 | 
				
			||||||
    return urllib.parse.quote(
 | 
					    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:
 | 
					def encode_stream(stream_id: int, stream_name: str) -> str:
 | 
				
			||||||
    # We encode streams for urls as something like 99-Verona.
 | 
					    # We encode streams for urls as something like 99-Verona.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user