Entry IDs for Atom feeds generated from Bazaar branches

James Henstridge james at jamesh.id.au
Mon Apr 2 08:45:43 BST 2007


On 30/03/07, James Henstridge <james at jamesh.id.au> wrote:
> > 2) I would also mention that they should be url escaped. (@ => %40,
> > etc). Just so that people don't forget about it.
>
> Yep.  The Atom spec recommends only percent encoding characters that
> need to be encoded, so I'll take a look at what characters these are
> for fragment identifiers (I am not sure that @ needs to be, for
> instance).

Looking at RFC 3986, we have:

 fragment      = *( pchar / "/" / "?" )
 pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
 unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
 sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
               / "*" / "+" / "," / ";" / "="
 pct-encoded   = "%" HEXDIG HEXDIG

So "@" is allowed in a fragment identifier without percent-escaping
(and hence should not be escaped in an Atom entry ID).

James.



More information about the bazaar mailing list