Skip to main content

Module url_encoding

Module url_encoding 

Source

Constants§

FRAGMENT_FORBIDDEN 🔒
What to encode: everything the fragment = *( pchar / "/" / "?" ) production disallows, except # and %, which are left alone so that a whole URI reference and its existing escapes survive.

Functions§

percent_encode_component
Percent-encodes everything but ASCII alphanumerics, for a value placed in one URL path segment or query parameter. Same encoding as url_encode, as a String.
percent_encode_fragment
Percent-encodes the characters RFC 3986 forbids in a URI reference’s fragment.
url_decode
URL-decodes a percent-encoded string back to its original UTF-8 representation. Decodes percent-encoded values back to their original UTF-8 strings.
url_encode
URL-encodes a string value for use in HTTP headers or other contexts requiring ASCII-compatibility. Percent-encodes all non-alphanumeric characters (including spaces, punctuation, ASCII special characters, non-ASCII characters, and control characters) to preserve the original information while making the value ASCII-safe for use in HTTP headers or other contexts requiring ASCII-compatibility.