Spaces in mailto links

Discussion in 'HTML' started by Russell May, Feb 27, 2004.

  1. Russell May

    Russell May Guest

    Here is an example of a format I have used for personalized mailto links since
    year 2000, using my name and a fictitious address:
    <a href="mailto:Russell&nbsp;May&lt;&gt;"></a>
    It uses character entity names for non-break space, less-than, greater-than
    symbols.

    Mouseover of the mailto link should not show any strange characters in the
    browser status window. Clicking on the link should bring up a mail program with
    the email address (including the person's name but with no strange characters)
    in the "To:" window.

    In year 2000 this format worked completely for nearly all browsers and mail
    programs I tried then. (AOL 5.0 and Compuserve 4.0 were the exceptions.)

    In year 2004 it still works properly for Netscape 7.0 and Internet Explorer 6.0
    browsers used with Netscape Mail, Outlook, Outlook Express, Eudora Lite 3.05,
    and Free Agent 1.93 mail programs. I have been told that it works properly with
    a combination of the latest Mozilla browser and Mozilla Mail but I have not
    tried that combination.

    It does NOT work properly with Mozilla 1.6 or 1.7a or Netscape 7.1 browsers and
    any of the mail programs that I have tried. Clicking on the link brings up the
    mail program with an A with ^ over it (A circumflex, &Acirc;) before the space
    in the "To:" window. The message is sent with the extra character in the header.
    I looks bad.

    The February 2000 version of Tidy HTML validator shows no errors, warnings, or
    changes for this format in an HTML file. The February 2004 version of Tidy warns
    of a malformed URI link; and changes the non-break space to %C2%A0, the
    less-than symbol to %3C, and greater-than symbol to %3E. I presume that is what
    Netscape 7.1 and Mozilla are doing. %C2%A0 causes the problem for all of the
    mail programs I have tried recently. A space, %20, %80, or € works
    in all of the combinations I tried recently. They caused minor problems with
    some browsers or mail programs I tried in 2000.

    I cannot find anything which says that a non-break space should be converted to
    %C2%A0 in a URI. The HTML 4.01 spec seems to say that anything in a URI outside
    the range of %20 to %7F is non-compliant.

    Can anyone point me toward something that says whether or why the conversion
    from non-break space to %C2%A0 happens?
     
    Russell May, Feb 27, 2004
    #1
    1. Advertising

  2. Russell May

    Russell May Guest

    On Fri, 27 Feb 2004 19:05:47 GMT, (Russell May) wrote:

    Ooops,
      misoperates like &nbsp;
    %A0 works okay
     
    Russell May, Feb 27, 2004
    #2
    1. Advertising

  3. (Russell May) wrote:

    > Here is an example of a format I have used for personalized mailto links since
    > year 2000, using my name and a fictitious address:
    > <a href="mailto:Russell&nbsp;May&lt;&gt;"></a>
    > It uses character entity names for non-break space, less-than, greater-than
    > symbols.


    Russell May<>
    with char xA0 between "Russell" and "May" is an illegal address.
    Correct are
    Russell May <>
    (Russell May)
    with space between "Russel" and "May".

    The second form can be written in HTML as
    <a href="mailto:%20(Russel%20May)">

    --
    Top-posting.
    What's the most irritating thing on Usenet?
     
    Andreas Prilop, Feb 27, 2004
    #3
  4. Russell May

    SpaceGirl Guest

    "Russell May" <> wrote in message
    news:...
    > Here is an example of a format I have used for personalized mailto links

    since
    > year 2000, using my name and a fictitious address:
    > <a href="mailto:Russell&nbsp;May&lt;&gt;"></a>
    > It uses character entity names for non-break space, less-than,

    greater-than
    > symbols.
    >
    > Mouseover of the mailto link should not show any strange characters in the
    > browser status window. Clicking on the link should bring up a mail program

    with
    > the email address (including the person's name but with no strange

    characters)
    > in the "To:" window.
    >
    > In year 2000 this format worked completely for nearly all browsers and

    mail
    > programs I tried then. (AOL 5.0 and Compuserve 4.0 were the exceptions.)
    >
    > In year 2004 it still works properly for Netscape 7.0 and Internet

    Explorer 6.0
    > browsers used with Netscape Mail, Outlook, Outlook Express, Eudora Lite

    3.05,
    > and Free Agent 1.93 mail programs. I have been told that it works properly

    with
    > a combination of the latest Mozilla browser and Mozilla Mail but I have

    not
    > tried that combination.
    >
    > It does NOT work properly with Mozilla 1.6 or 1.7a or Netscape 7.1

    browsers and
    > any of the mail programs that I have tried. Clicking on the link brings up

    the
    > mail program with an A with ^ over it (A circumflex, &Acirc;) before the

    space
    > in the "To:" window. The message is sent with the extra character in the

    header.
    > I looks bad.
    >
    > The February 2000 version of Tidy HTML validator shows no errors,

    warnings, or
    > changes for this format in an HTML file. The February 2004 version of Tidy

    warns
    > of a malformed URI link; and changes the non-break space to %C2%A0, the
    > less-than symbol to %3C, and greater-than symbol to %3E. I presume that is

    what
    > Netscape 7.1 and Mozilla are doing. %C2%A0 causes the problem for all of

    the
    > mail programs I have tried recently. A space, %20, %80, or €

    works
    > in all of the combinations I tried recently. They caused minor problems

    with
    > some browsers or mail programs I tried in 2000.
    >
    > I cannot find anything which says that a non-break space should be

    converted to
    > %C2%A0 in a URI. The HTML 4.01 spec seems to say that anything in a URI

    outside
    > the range of %20 to %7F is non-compliant.
    >
    > Can anyone point me toward something that says whether or why the

    conversion
    > from non-break space to %C2%A0 happens?
    >


    You can't have spaces in email addresses. "Miranda " is
    no a valid address, but "" is
     
    SpaceGirl, Feb 27, 2004
    #4
  5. Russell May

    Russell May Guest

    On Fri, 27 Feb 2004 20:24:03 +0100, Andreas Prilop
    <-hannover.de> wrote:

    > (Russell May) wrote:
    >
    >> Here is an example of a format I have used for personalized mailto links since
    >> year 2000, using my name and a fictitious address:
    >> <a href="mailto:Russell&nbsp;May&lt;&gt;"></a>
    >> It uses character entity names for non-break space, less-than, greater-than
    >> symbols.

    >
    > Russell May<>
    >with char xA0 between "Russell" and "May" is an illegal address.

    It does seem illegal because it is outside of the %20 to %7F range,
    but %A0 works with Netscape 7.1 and Outlook.
    >Correct are
    > Russell May <>
    > (Russell May)
    >with space between "Russel" and "May".

    I presume you are referring to what appears in the mail program "To:" window.
    >
    >The second form can be written in HTML as
    > <a href="mailto:%20(Russel%20May)">

    It worked for me today using Netscape 7.1 and Outlook,
    but so does my original format if I use %20 or %A0 instead of &nbsp;

    What I am most interested in is the last sentence of my original post:
    Can anyone point me toward something that says whether or why the conversion
    from non-break space to %C2%A0 happens?
     
    Russell May, Feb 27, 2004
    #5
  6. (Russell May) wrote:

    > It worked for me today using Netscape 7.1 and Outlook,
    > but so does my original format if I use %20 or %A0 instead of &nbsp;


    "%A0" represents character xA0 and this character would be illegal in
    an e-mail address.

    > What I am most interested in is the last sentence of my original post:
    > Can anyone point me toward something that says whether or why the conversion
    > from non-break space to %C2%A0 happens?


    The no-break space is xC2A0 in UTF-8.
    <http://www.w3.org/TR/html4/appendix/notes.html#non-ascii-chars>
    Again: You cannot have xA0 in an e-mail address.

    BTW: A more appropriate group is <news:comp.mail.mime> .

    --
    Top-posting.
    What's the most irritating thing on Usenet?
     
    Andreas Prilop, Feb 27, 2004
    #6
  7. Russell May

    Russell May Guest

    On Fri, 27 Feb 2004 19:34:12 -0000, "SpaceGirl" <>
    wrote:

    >
    >"Russell May" <> wrote in message
    >news:...
    >> Here is an example of a format I have used for personalized mailto links

    >since
    >> year 2000, using my name and a fictitious address:
    >> <a href="mailto:Russell&nbsp;May&lt;&gt;"></a>
    >> It uses character entity names for non-break space, less-than,

    >greater-than
    >> symbols.
    >>

    <snip>
    >> I cannot find anything which says that a non-break space should be

    >converted to
    >> %C2%A0 in a URI. The HTML 4.01 spec seems to say that anything in a URI

    >outside
    >> the range of %20 to %7F is non-compliant.
    >>
    >> Can anyone point me toward something that says whether or why the

    >conversion
    >> from non-break space to %C2%A0 happens?
    >>

    >
    >You can't have spaces in email addresses. "Miranda " is
    >no a valid address, but "" is
    >

    I agree in principle, even though spaces can actually be used.
    I have tried it with Netscape 7.0 and 7.1, Mozilla 1.6 and 1.7a;
    and in years 2000-2003 with Netscape 3.01, 4.0x and 4.7x.

    But notice: There are no spaces in my mailto address format.
    A character entity name &nbsp; is used instead.
    A character entity number has the same effect.
     
    Russell May, Feb 27, 2004
    #7
  8. (Russell May) wrote:

    > But notice: There are no spaces in my mailto address format.
    > A character entity name &nbsp; is used instead.


    This is a misunderstanding!
    If you write *in your HTML source*
    <a href="mailto:&nbsp;(Russel&nbsp;May)">
    then the mailto URL would be
    mailto: (Russel May)
    ^ ^
    with character xA0 at the indicated positions (assuming
    charset=ISO-8859-1).

    See? Your HTML source has no spaces, but your mailto address has.

    --
    Top-posting.
    What's the most irritating thing on Usenet?
     
    Andreas Prilop, Feb 27, 2004
    #8
  9. Russell May

    Russell May Guest

    On Fri, 27 Feb 2004 21:42:01 +0100, Andreas Prilop
    <-hannover.de> wrote:

    > (Russell May) wrote:
    >
    >> It worked for me today using Netscape 7.1 and Outlook,
    >> but so does my original format if I use %20 or %A0 instead of &nbsp;

    >
    >"%A0" represents character xA0 and this character would be illegal in
    >an e-mail address.

    That is what I thought too. But any of the mail programs
    that I tried recently used it okay. Sometimes things work
    in practice even if they should not work in theory.

    Is there anything theoretically wrong with this format?
    <a href="mailto:Russell%20May%%3E">Russ May</a>

    I could change my mailto links to the format that you suggest,
    but changing to this one would be simpler. Just search-and-replace.

    >> What I am most interested in is the last sentence of my original post:
    >> Can anyone point me toward something that says whether or why the conversion
    >> from non-break space to %C2%A0 happens?

    >
    >The no-break space is xC2A0 in UTF-8.
    > <http://www.w3.org/TR/html4/appendix/notes.html#non-ascii-chars>
    >Again: You cannot have xA0 in an e-mail address.

    That almost got me to the right spot. I had looked in
    http://www.ietf.org/rfc/rfc2279.txt previously but I had
    not recognized the following as the source of the conversion:
    UCS-4 range (hex.) UTF-8 octet sequence (binary)
    0000 0000-0000 007F 0xxxxxxx
    0000 0080-0000 07FF 110xxxxx 10xxxxxx
    :
    :
    partly because I not realized for a while that the
    character entity number for &nbsp; is actually  
    I was especially confused by the fact that %C2 and %A0
    individually appear to be invalid.
    >
    >BTW: A more appropriate group is <news:comp.mail.mime> .

    Maybe true, but I came across this one first.

    Thanks for your help.
     
    Russell May, Feb 27, 2004
    #9
  10. (Russell May) wrote:

    > Is there anything theoretically wrong with this format?
    > <a href="mailto:Russell%20May%%3E">Russ May</a>


    Another "%20" is missing:
    <a href="mailto:Russell%20May%20%%3E">

    --
    Top-posting.
    What's the most irritating thing on Usenet?
     
    Andreas Prilop, Feb 27, 2004
    #10
  11. Russell May

    Russell May Guest

    On Fri, 27 Feb 2004 22:23:35 +0100, Andreas Prilop
    <-hannover.de> wrote:

    > (Russell May) wrote:
    >
    >> Is there anything theoretically wrong with this format?
    >> <a href="mailto:Russell%20May%%3E">Russ May</a>

    >
    >Another "%20" is missing:
    > <a href="mailto:Russell%20May%20%%3E">


    I can do that :)
    (although I am not sure why the extra character is needed)

    I omitted the space (%20) before the less-than symbol because
    some browsers or mail programs in 2000 inserted a space there,
    producing two contiguous spaces. I don't know whether this happens
    with current browsers and mail programs, but it is a minor problem
    at worst.

    Thanks again.
     
    Russell May, Feb 27, 2004
    #11
  12. (Russell May) wrote:

    >> <a href="mailto:Russell%20May%20%%3E">

    >
    > I omitted the space (%20) before the less-than symbol because
    > some browsers or mail programs in 2000 inserted a space there,
    > producing two contiguous spaces.


    No problem with that. You could write
    Russell May <>
    with even more spaces.

    --
    Top-posting.
    What's the most irritating thing on Usenet?
     
    Andreas Prilop, Feb 27, 2004
    #12
  13. Russell May

    SpaceGirl Guest

    "Andreas Prilop" <-hannover.de> wrote in message
    news:270220042239028606%-hannover.de...
    > (Russell May) wrote:
    >
    > >> <a href="mailto:Russell%20May%20%%3E">

    > >
    > > I omitted the space (%20) before the less-than symbol because
    > > some browsers or mail programs in 2000 inserted a space there,
    > > producing two contiguous spaces.

    >
    > No problem with that. You could write
    > Russell May <>
    > with even more spaces.
    >
    > --
    > Top-posting.
    > What's the most irritating thing on Usenet?


    My worry with all of this is... would it work even if you managed to get the
    damn thing to send? I'm fairly sure most mail programs would think it was an
    invalid address. Even if mail READING software doesn't dump the mail as an
    invalid address, what about mail routers? I'm fairly sure they would choke
    too. Exchange (for example) doesn't seem to like spaces in addresses... it
    just wont accept them. Not sure about other mail server software.
     
    SpaceGirl, Feb 27, 2004
    #13
  14. SpaceGirl wrote:
    > "Andreas Prilop" <-hannover.de> wrote:
    >
    >> No problem with that. You could write
    >> Russell May <>
    >> with even more spaces.

    >
    > My worry with all of this is... would it work even if you managed to get the
    > damn thing to send? I'm fairly sure most mail programs would think it was an
    > invalid address. Even if mail READING software doesn't dump the mail as an
    > invalid address, what about mail routers? I'm fairly sure they would choke
    > too. Exchange (for example) doesn't seem to like spaces in addresses... it
    > just wont accept them. Not sure about other mail server software.


    The servers don't come into it. Mail clients don't[1] include the Real
    Name part of to 'To:' field in the SMTP envelope, so mail servers don't
    even see it.

    ---
    [1] Well, there's always a chance that some stupid mail client might, but
    it would be so severely borked that no-one would use it.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Feb 28, 2004
    #14
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davmagic .Com

    Form Mail vs Mailto Links

    Davmagic .Com, Sep 27, 2004, in forum: HTML
    Replies:
    4
    Views:
    2,735
    Jim Higson
    Sep 28, 2004
  2. Andrew McLean
    Replies:
    3
    Views:
    1,101
    Andrew McLean
    Jun 27, 2006
  3. JL
    Replies:
    4
    Views:
    403
    Chris F.A. Johnson
    Sep 4, 2007
  4. John B. Matthews
    Replies:
    4
    Views:
    694
    John B. Matthews
    Sep 12, 2008
  5. Thomas Gagne
    Replies:
    2
    Views:
    358
    Robert Klemme
    Mar 15, 2013
Loading...

Share This Page