views:

44

answers:

1

Hey guys,

I am using microformats for a project and with this I have the following Problem. I use a Javascript to protect the email addresses, but when saving the microformats as a vCard it puts the javascript code in the email address field.

//<![CDATA[ document.write("<n uers="znvygb:vasb100irner56arg">vasb100irner56arg<057n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26)}))//]]>

Does anyone have any idea how to still protect the email address but use microformats?

Thanks in advance.

+1  A: 

Issue is that the e-mail addr should be in the HTML in order to use the microformat. Perhaps let your server return the microformat (i.e. webservice)?

Returning the vcard from the server can be done using the scripts i found here:

http://www.troywolf.com/articles/php/class_vcard/

Sander Pham
Yes, that actually is the issue. What do you mean by letting my server return the microformat?I am not sure, but do the micorformat scripts to the same the crawlers do?So is there any possibility of a way the microformat scripts could read the address but the spambots can't?
Lukas Oppermann
See edited text
Sander Pham
Thanks for the testing. I seem to do somthing wrong. Using<span class="email"><input type="hidden" name="business" value="person<code>@</code>domain" /></span>the h2vx.com script does not put the email in the downloaded vcard.How did you do that?
Lukas Oppermann
Sorry, my mistake. You are right.
Sander Pham
Okey, damn, would have been at least a possibility. Thanks for the link though. That would be an alternative, the only problem would be when using a firefox plugin or a bookmark script. So if anybody has any other ideas, please let me know.
Lukas Oppermann