From: Brian Candler Date: 2002-10-21T20:05:46+09:00 Subject: Re: URI bug or bad URI? On Sun, Oct 20, 2002 at 08:24:07PM +0900, akira yamada wrote: > > >>>>> In [ruby-talk : No.53493] > >>>>> Alan Chen wrote: > > mailto = URI.new( 'mailto:user@domain.com?subject=test%20(@test=10) > > > > Are '@' symbols allowed in uri's in this context or do they need to be > > escaped? > > '@' is OK. But '=' cannot be put in hvalue. I think that 'subject: > test (@test=10)' should be written as 'subject=test%20(@test%3D10)' in > URI. RFC2368: ``Note that all URL reserved characters in "to" must be encoded: in particular, parentheses, commas, and the percent sign ("%"), which commonly occur in the "mailbox" syntax. "hname" and "hvalue" are encodings of an RFC 822 header name and value, respectively. As with "to", all URL reserved characters must be encoded.'' But that conflicts with RFC1738 which explicitly allows parentheses and commas as unreserved characters which can always be used unencoded in a URL. Grr. Anyway, if you want to err on the safe side, you might choose subject=test%20%28@test%3D10%29