Christian Kruse <ckruse / wwwtech.de> wrote:
> Stefan Scholl <stefan.scholl / brave.de> wrote:
>> Alan Chen <alan / digikata.com> wrote:
>> > mailto = URI.new( 'mailto:user / domain.com?subject=test%20(@test=10)
>> 
>> There's no "?subject" in mailto:
> 
> Of course there is. You can add a querystring.

No querystring with mailto scheme.


RFC 1738
3.5. MAILTO

   The mailto URL scheme is used to designate the Internet mailing
   address of an individual or service. No additional information other
   than an Internet mailing address is present or implied.

   A mailto URL takes the form:

        mailto:<rfc822-addr-spec>

   where <rfc822-addr-spec> is (the encoding of an) addr-spec, as
   specified in RFC 822 [6]. Within mailto URLs, there are no reserved
   characters.

   Note that the percent sign ("%") is commonly used within RFC 822
   addresses and must be encoded.

   Unlike many URLs, the mailto scheme does not represent a data object
   to be accessed directly; there is no sense in which it designates an
   object. It has a different use than the message/external-body type in
   MIME.

[...]

; MAILTO (see also RFC822)

mailtourl      = "mailto:" encoded822addr
encoded822addr = 1*xchar               ; further defined in RFC822


> But brackets are not
> allowed in URIs, neither are @s.

No, "(", ")", and "@" aren't unsafe.


RFC1738:
   Unsafe:

   Characters can be unsafe for a number of reasons.  The space
   character is unsafe because significant spaces may disappear and
   insignificant spaces may be introduced when URLs are transcribed or
   typeset or subjected to the treatment of word-processing programs.
   The characters "<" and ">" are unsafe because they are used as the
   delimiters around URLs in free text; the quote mark (""") is used to
   delimit URLs in some systems.  The character "#" is unsafe and should
   always be encoded because it is used in World Wide Web and in other
   systems to delimit a URL from a fragment/anchor identifier that might
   follow it.  The character "%" is unsafe because it is used for
   encodings of other characters.  Other characters are unsafe because
   gateways and other transport agents are known to sometimes modify
   such characters. These characters are "{", "}", "|", "\", "^", "~",
   "[", "]", and "`".