Skip to content

Instantly share code, notes, and snippets.

@abernier
Last active August 8, 2016 17:31
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save abernier/6203636 to your computer and use it in GitHub Desktop.
Email CSS direction obfuscation -- with progressive enhancement
<!DOCTYPE html>
<meta charset=utf-8>
<title>Email CSS direction obfuscation -- with progressive enhancement</title>
<span style="display:inline-block; unicode-bidi:bidi-override; direction:rtl;" onmouseover="this.innerText=this.innerText.split('').reverse().join(''); this.style.unicodeBidi='';this.style.direction=''; this.removeAttribute('onmouseover');">
moc.liamg@reinreb.eniotna
</span>
@abernier
Copy link
Author

@jherup
Copy link

jherup commented Jan 5, 2016

Very nice! Assuming the client has JavaScript enabled, of course.
I took the liberty of adapting your code for use in a mailto link:

<a href="" onmouseover="this.href='moc.elpmaxe@enoemos:otliam'.split('').reverse().join(''); this.removeAttribute('onmouseover');">
<span style="display:inline-block; unicode-bidi:bidi-override; direction:rtl;" onmouseover="this.innerText=this.innerText.split('').reverse().join(''); this.style.unicodeBidi='';this.style.direction=''; this.removeAttribute('onmouseover');">moc.elpmaxe@enoemos</span>
</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment