I want encoded emails, but i’m having probelms (want emails protected by javascript so spammers have a harder time getting them).
I need to display email links 2 ways:
1.
I have a channel that has an email address in a wygwam (third-party) field. that channel DOES have the prefernce set to turn urls & emails into links automatically. but, the email address is not being encoded. What could be wrong here? Should be pretty straightforward, right? I am using a channel tag, with my custom field’s name inside curly brackets to output the content of the wygwam field. The email address shows up as a link that is clickable, but when i view the source code for the page, the email address is not encoded, it is just given out in plain text.
2.
In another place, i want to hard-code the email address into a template. how do i get that email address to encode? I tried this:
<a href="mailto:{encode=%[email protected]%27}" class="envelope">mailtest</a>but it doesn’t work, it shows the encoded javascript on the page. I need to use a mailto link in an anchor tag here because I am actually using CSS to just show an image instead of the text ‘mailtest’. Notice I am using single quotes inside the encode thing, and double quotes outside it, as the encloser for the mailto part.
So, how do I solve both these problems?
Using EE v2.5.2 - Build Date: 20120606.