Spaces in mailto links

R

Russell May

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;[email protected]&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?
 
R

Russell May

On Fri, 27 Feb 2004 19:05:47 GMT, (e-mail address removed) (Russell May) wrote:

Ooops,
  misoperates like &nbsp;
%A0 works okay
 
A

Andreas Prilop

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;[email protected]&gt;"></a>
It uses character entity names for non-break space, less-than, greater-than
symbols.

Russell May<[email protected]>
with char xA0 between "Russell" and "May" is an illegal address.
Correct are
Russell May <[email protected]>
(e-mail address removed) (Russell May)
with space between "Russel" and "May".

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

SpaceGirl

Russell May said:
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;[email protected]&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 (e-mail address removed)" is
no a valid address, but "(e-mail address removed)" is
 
R

Russell May

Russell May<[email protected]>
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 <[email protected]>
(e-mail address removed) (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:[email protected]%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?
 
A

Andreas Prilop

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 <.
 
R

Russell May

You can't have spaces in email addresses. "Miranda (e-mail address removed)" is
no a valid address, but "(e-mail address removed)" 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.
 
A

Andreas Prilop

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:[email protected]&nbsp;(Russel&nbsp;May)">
then the mailto URL would be
mailto:[email protected] (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.
 
R

Russell May

"%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%[email protected]%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.
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.
 
R

Russell May

Another "%20" is missing:
<a href="mailto:Russell%20May%20%[email protected]%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.
 
A

Andreas Prilop

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 <[email protected]>
with even more spaces.
 
S

SpaceGirl

Andreas Prilop said:
No problem with that. You could write
Russell May <[email protected]>
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.
 
T

Toby A Inkster

SpaceGirl said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top