Question

Is it okay to use an unencoded @/at symbol in a URL path like this?

https://example.com/User/test@example.com

Precent-encoded, it would be https://example.com/User/test%40example.com, which is not as readable by humans.

Either appears to work in the major browsers - wondering if there are cases where it would cause problems.

Was it helpful?

Solution

Have a look at the "pchar" ABNF rule in RFC 3986 (http://greenbytes.de/tech/webdav/rfc3986.html#path):

pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"

So yes, "@" is allowed and does not need to be escaped.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top