[uf-discuss] hCard and encoded e-mail addresses

Paul Lloyd paul.lloyd at fourtwo.net
Thu Jun 22 17:20:00 PDT 2006

Hi all,

I have a question/concern (and one that Tantek flagged up during his  
presentation at @media last week) with regards to e-mail addresses,  
and the fact that publishing them on the web can open them up to abuse.

Currently, I display my e-mail address on my personal site (http:// 
www.lloydyweb.com/) by means of using name(at)domain.com notation,  
and then having a little piece of javascript that finds all <span>s  
with a class 'email' and converts them into the correct link. So:

<span class="email">paul.lloyd(at)fourtwo.net</span>


<a class="email"  
href="mailto:paul.lloyd at fourtwo.net">paul.lloyd at fourtwo.net</a>

I understand that for hCard, the e-mail actually needs to be an  
unaltered e-mail address, so this would not be possible.  Or is it  
okay given that the browser *renders* it correctly?

Looking at other methods of encoding an e-mail address, I have seen  
some sites where they encode the characters (including the mailto:):

#46;&#99;&#111;&#46;&#117;&#107;.... etc

Would this method also not be allowed in the hCard spec?

So my question is has anyone thought of ways to get around this  
problem?  One solution would be to perhaps define a standard notation  
(such as name(at)example.com) and then parsers such as  
feeds.technorati.com/contacts/ could convert this into the correct  
format before saving out as a vCard?  But then again, maybe not!

I'd love to get some thoughts (even better answers!) on this issue.   
It seems a shame that I can display my e-mail on my site, but not  
have it included within my hCard markup.  Or have I missed something?


Paul Lloyd

More information about the microformats-discuss mailing list