Characters may be erroneously transformed by some part of the build.
An image [email protected] provided a url/file mismatch when bundled with Jetpack blocks: #29053 / #29059
I created #29285 to debug this.
There's some relevant commentary in the workaround PR: https://github.com/Automattic/wp-calypso/pull/29059#issuecomment-444240094
It's unclear to me at this time whether or not parts of the build are working correctly or not, #29285 seems to be completely broken.
According to the following, I believe @ is a reserved character in URIs
URIs include components and subcomponents that are delimited by
characters in the "reserved" set […]reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
https://tools.ietf.org/html/rfc3986#section-2.2
@dmsnell It seems you looked at some different references and reached a different conclusion – https://github.com/Automattic/wp-calypso/pull/29059#issuecomment-444240094
Just for reference I verified in the URL spec and a
@seems totally legitimate in the path section (also in the login part) of the URL and has no need in URLs to be escaped.
Had you seen the URI reserved characters? Do you have a good grasp of what would be the expected behavior here?
Super-anecdotal evidence, the @ is used a lot in Medium routes for author names (like medium.com/@author/article-name-followed-by-some-sha-3a26ef)
Going through whatwg spec, I think @ is fine in a path after all:
A valid URL string must be either a relative-URL-with-fragment string or an absolute-URL-with-fragment string.
[…]
A path-absolute-URL string must be U+002F (/) followed by a path-relative-URL string.
A path-relative-URL string must be zero or more URL-path-segment strings, separated from each other by U+002F (/), and not start with U+002F (/).
A URL-path-segment string must be one of the following:
- zero or more URL units, excluding U+002F (/) and U+003F (?) […]
- […]
The URL units are URL code points and percent-encoded bytes.
The URL code points are […] U+0040 (@)
https://url.spec.whatwg.org/#valid-url-string
You beat me to it @sirreal - I was going to say that the @ is special before the path because it's used for user authentication but it's part of the safe group inside the path > segment rule.
My understanding confirms what you found - it's legal and fine.
This is not a Calypso bug. It turns out this is a bug somewhere between the way CircleCI creates artifact URLs and the way we're syncing them.
Additional details here: p1547643645106500-slack-team-calypso