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

Ryan King ryan at technorati.com
Thu Jun 22 17:29:23 PDT 2006


On Jun 22, 2006, at 5:20 PM, Paul Lloyd wrote:
> 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>

This is fine as hCard. I'm not sure if vCard consumers will like it, 
though, if it doesn't get cleaned up.
> becomes:
>> <a class="email" 
> href="mailto:paul.lloyd at fourtwo.net">paul.lloyd at fourtwo.net</a>

The a at href with a mailto: URI is optional, the above markup works fine.
> 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?

No, this is allowed. Any HTML or XHTML parser would have to be able 
to resolved these entities.
> 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!

Of course, the spammers can use the same standard notation.
-ryan


More information about the microformats-discuss mailing list

AltStyle によって変換されたページ (->オリジナル) /