Skip to main content

encode_userinfo_component

No overview available.

def encode_userinfo_component(
text: string
) - > string

Encodes a string for use in the userinfo component of a URI, ensuring that reserved characters are properly escaped according to RFC 3986.

Parameters

NameTypeDescription
textstringThe raw string content, such as a username or password, that needs to be encoded for URI safety.

Returns

TypeDescription
stringThe percent-encoded string safe for use in the username or password fields of a URI.