Using Css this flips the mirror image. In testing this is fullproof http://albertogasparin.it/scraps/2011/02/rtl-better-email-obfuscation-css-anchor/. However, the css/html only you cant use mailto also. So it’s unclickable. This guy http://albertogasparin.it/scraps/2011/02/rtl-better-email-obfuscation-css-anchor/ has a almost near perfect solution. Using JS he makes it clickable and flips it. However it’s a little buggy. But its proof of concept! On my ipad it works perfect. In firefox on click it loads default email program and fills the the send to box but with this “”%20%20%20%20email@domain.com%20%20%20%20%20. In IE like this “%20email@domain.com” and on click changes it back to reverse “moc.niamod@liame”.
So in a perfect world I’m hoping someone can fix the js. Then I will try and feed the backwards text with JS or other. Because if js fails I dont want it there. Its no longer clickable and if you copy and paste it it pastes the reverse text. Thats no good. So I’ll do some noscript thing or something.
It is picking up the spaces on either side of the email address and they end up each encoded as %20
There are a couple of ways to fix it.
Simply get rid of the spaces so that the email address ins the only thing inside the tad.
trim() the leading and traimilg spaces from the calue before splitting it into individual characters. Modern browsers support the trim() method on strings but depending on which older browsers you want to support you may need to implement your own.
There doesn’t seem to be any perfect way to encode an email address. I prefer a contact form, but where a client wants the email address there too, I just use this handy encoder form:
It only works with JS on, of course. So I tend to encode the whole line that invites the visitor to get in contact via email. That way, if JS is off, the user doesn’t see anything at all, and just has to use the contact form instead.
Another option I like is to retype the email address by replacing each character in numeric character references. For example, and address like
[noparse]me123@me.com[/noparse]
would be written as
me123@me.com
I’m not sure how that plays with screen readers, though.
As you can see they both spit out the same generated source code. Although my second one here keeps it completely out of the html. This is just one of 10 different ways I’ve been messing with. Trying to see if I can find a better way. A pure CSS/PHP way is the best. Ive got a couple of those but they dont hide it very well.
I don’t think they can, but perhaps I’m wrong? Not sure … Of course, humans can read the generated code, and plenty of them are spammers, so you are never going to get off scot-free.
Look at this bad boy! by Eric. Js on or off works perfect. href is hid and the link email text is hid. I like to use the email in the anchor text not “Email me” or other. As the article in OP says the css display none is fullproof. I wanted to use the other css ways. But the content property one firefox and chrome cant copy the text. And the reverse css one the text is copied in reverse.
I still would like to use the OP fixed - but… Look at this. Pretty much perfect. Possibly the best on the web.
Use this ROT13 JavaScript coder/decoder http://tornio.info/rot13.html and put in your entire email - including the mailto, href, and link text
grab the ROT13 code and insert it into the below code - Done! Best ever. Works with JS on or Off. Hides email href mailto: link and text in the link both js on and off 100%. I did away with the noscript because the getID just inserts it in it’s place.
using something like this I can do away with the extra “no” and just switch it’s order but I can’t get the browsers to be able to copy all the text. That’s important. The css reverse order and content property you will find elsewhere on the web suffer from the same copy/paste problem.
Have at it. Let me know if some one finds a way to copy and paste all the text…
As a side not. I scrambled the above code after posting because i realized it was my email. It comes out poorly formatted. However if you grab your own from the above mentioned decoder the formating will be perfect.