djangosnippets.org: Latest snippets posted by rukebahttps://djangosnippets.org/users/rukeba/2008-05-06T00:19:13.648441-05:00rukebahide_email
2008-05-06T00:19:13.648441-05:00rukebahttps://djangosnippets.org/snippets/740/<p>This templatetag obsfucate mailto link and hide it while not happen onmouseover event.</p>
<p>Usage:</p>
<pre><code>{% hide_email object.author object.author.email %}
</code></pre>
<p>Output:</p>
<pre><code><a href="mailto:noreply@spammer.net"
onmouseover="var a=String.fromCharCode(79+35,14+103,66+41,30+71,49+49,16+81);
var b=String.fromCharCode(14+50,9+105,61+56,81+26,92+9,2+96,20+77,13+33,75+24,32+79,31+78);
this.href=['mail','to:',a,b].join('');">rukeba</a>
</code></pre>
<p>Based on <a href="http://www.djangosnippets.org/snippets/536/">Email Obsfucator</a> and <a href="http://market.yandex.ru/forums/">forums at Yandex.Market</a>.</p>
<p>Example at <a href="http://rukeba.com/ra/2008/01/15/oasis-wonderwall/">my guitar blog</a></p>
Freely redistributable