Skip to main content

smart_urlquote

Quote a URL if it isn't already quoted.

def smart_urlquote(
url: string
) - > string

Quote a URL if it isn't already quoted.

Parameters

NameTypeDescription
urlstringThe raw URL string to be normalized and quoted, which may contain unencoded characters or internationalized domain names.

Returns

TypeDescription
stringThe normalized URL string where the network location, path, query parameters, and fragments are safely percent-encoded.