Hi,
I am trying to markup email as part of an hcard but I am also using javascript to protect the email address.
I end up exporting the javascript code instead of the actual email address. Does anyone know a way around this?
Thanks!
| SitePoint Sponsor |
Hi,
I am trying to markup email as part of an hcard but I am also using javascript to protect the email address.
I end up exporting the javascript code instead of the actual email address. Does anyone know a way around this?
Thanks!
Microformats add additional semantic markup to HTML documents. The email address would therefore have to be in the HTML to use a Microformat. If you're primary goal is to provide your visitors with a vCard, you could simply upload a vCard to your server and link to it. You'll just have to remember to keep it updated if your contact info changes.
Thanks Christopher, I was thinking it may come to that. Do you think it is worth risking just leaving an email address out there unprotected? Otherwise, how would anyone ever use the hcard and include an email as well as provide protection from spam bots?
I know this is not a foolproof plan, but I convert the entire email address into HTML entities. I figure some bots are smart enough to see through this, but hopefully it will cut down the readability some. The added benefit is that the email address can then be used with the hcard microformat.
I've actually had my email address posted online in the clear for over a year now, and my email address is listed many times in the whois directory, and I really haven't had a problem with spam. I get spam, but only 1 or 2 a day, and it's really not a big deal. However, that's just me. I don't know what others' experiences have been like.
I actually get much more spam on my work email address, which isn't published anywhere--probably because all the email addresses on our domain use the same format.
I have actually had a similar experience. I have used a generic "info@..." email address on our website. It does get spam, but my business partner's email address (which has never been on the website) gets quite a bit more spam. I chock this up to having signed up for website membership and having to give out that email address when doing so.
Thanks everyone for the posts. I have had experience as well having an email address out in the open and not receiving much spam, however, since this is for a client I would like to be able to tell them that I at least put in some effort to protect them from spam.
@leoschmidt08:
I think that I will go with using special characters to encode the email address. Even though I am sure some bots can decipher this, it may help a bit.
For folks interested in not doing this by hand, here is a handy web app that does it for you and offers encoding with both the mailto: and without it. It can be found at zapyon dot de slash spam-me-not
Bookmarks