-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
encoded.replace(/%5B/g, '[').replace(/%5D/g, ']');Ensuring that [ and ] are not percent-encoded is because these characters are part of the syntax used in IPv6 addresses within URIs. According to the URI standard (RFC 3986), these characters are allowed in the host component of a URI to enclose IPv6 addresses, and encoding them would break the correct representation of such addresses.
For example, an IPv6 address in a URL looks like this: http://[2001:db8::1]/. If [ and ] were percent-encoded, it would result in an incorrect URL: http://%5B2001:db8::1%5D/. Thus, these characters must remain unencoded to ensure valid URLs.
Metadata
Metadata
Assignees
Labels
No labels