Skip to main content
5 of 5
replaced http://webmasters.stackexchange.com/ with https://webmasters.stackexchange.com/

This is ... a bone of contention; basically, the email address is perfectly valid - but the browsers can't agree on what the correct encoding is - whether it is [email protected] vs %-encoding, and no single encoding works on all browsers. We've gone with the former for now, as it has wider compatibility - BUT I was very disappointed that when google added an official mailto: handler, they broke this (so it comes in as foo [email protected]), when every other browser works the other way. FWIW, the previous unofficial handlers in gmail were also broken.

This is discussed more https://webmasters.stackexchange.com/questions/15920/should-plus-be-encoded-in-mailto-hyperlinks, and AFAIK the conclusion is: it is ambiguous spec.

But! Try it in IE/FF/Safari/Chrome etc to see it work/not-work. You might need to test both the "mailto:" handler (i.e. going to an email client), and the "copy email address" that most browsers will add as a context menu. Sigh.

Example: http://jsfiddle.net/zmEPe/

Browser     |             With +           |             With %2b
            | Click link    | Copy address | Click link    | Copy address
------------+---------------+--------------|---------------|----------------
Chrome 18   | Fail (" ")    | Pass ("+")   | Pass ("+")    | Fail ("%2b")
w/ GMail    |               |              |               |
            |               |              |               | 
IE 9        | Pass ("+")    | N/A          | Pass ("+")    | N/A
w/LiveMail  |               |              |               |
            |               |              |               |
Safari 5    | Pass ("+")    | Pass ("+")   | Pass ("+")    | Fail ("%2b")
w/ LiveMail |               |              |               |
            |               |              |               |
Firefox 10  | Pass ("+")    | Pass ("+")   | Pass ("+")    | Pass ("+")
w/ LiveMail |               |              |               |

So: if we want this to work everywhere, we're going to need per-browser markup, which is - just wrong.

From the table, and the spec, I conclude that mailto:[email protected] is the more right representation, and if only the GMail handler wasn't broken, the world would make sense everywhere.

Blame GMail.

I tested this and logged a bug as soon as the official GMail mailto handler was released. AFAIK, it disappeared into the ether.