[uf-discuss] hCard and encoded e-mail addresses
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,
> 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.
> <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;co.uk.... 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.
More information about the microformats-discuss