Skip to main content

escape_uri_path

Escape the unsafe characters from the path portion of a Uniform Resource Identifier (URI).

def escape_uri_path(
path: string
) - > string

Escape the unsafe characters from the path portion of a Uniform Resource Identifier (URI).

Parameters

NameTypeDescription
pathstringThe raw URI path string containing characters that need to be escaped according to RFC 3986.

Returns

TypeDescription
stringThe URI-encoded path string where unsafe characters are replaced by percent-encoded sequences, while preserving valid path delimiters and sub-delimiters.