<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://scox.info/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>scox.info - Random Thoughts - spam</title>
  <link>http://scox.info/</link>
  <description></description>
  <language>en</language>
  <pubDate>Tue, 06 Jan 2009 23:47:29 +0100</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Mephisto Obfuscation Plugin</title>
    <link>http://scox.info/post/2007/4/23/mephisto-obfuscation-plugin</link>
    <guid isPermaLink="false">urn:md5:8831feb025fcf80055ac81337edac174</guid>
    <pubDate>Sun, 22 Apr 2007 20:42:00 +0000</pubDate>
    <dc:creator>scox</dc:creator>
        <category>spam</category>
        <category>mephisto</category><category>obfuscation</category><category>spam</category>    
    <description>    &lt;p&gt;Being tired of receiving &lt;strong&gt;tons&lt;/strong&gt; of spam everyday, I wanted to hide my e-mail address in a more efficient way than the usual &lt;em&gt;user at example dot com&lt;/em&gt;. I needed to obfuscate my address to spam crawlers while keeping it readable by human beings. I've created a simple &lt;a href=&quot;http://mephistoblog.com/&quot;&gt;Mephisto&lt;/a&gt; plugin to help me do so, called &lt;em&gt;MephistoObfuscate&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Basically, this plugin encodes email addresses (or any text you'd like) into &lt;a href=&quot;http://en.wikipedia.org/wiki/Base64&quot;&gt;Base64&lt;/a&gt; and lets the browser decode them using some JavaScript on the client side. That way, the address is protected from crawlers blindly scanning the HTML page but is still readable by JavaScript-enabled browsers.&lt;/p&gt;
&lt;h3&gt;Example&lt;/h3&gt;
&lt;p&gt;Using &lt;em&gt;MephistoObfuscate&lt;/em&gt; is pretty straightforward, you can either use a Liquid filter on your templates (useful to show a contact address on the layout, just like the one on the right sidebar of this page):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{ &quot;user@example.com&quot; | obfuscate }}&lt;/code&gt;&lt;/pre&gt;Or you can use a macro filter within your blog posts:
&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;filter:obfuscate&amp;gt;user@example.com&amp;lt;/filter:obfuscate&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Both of these will be obfuscated into something like:
&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;span class=&quot;obfuscated&quot;&amp;gt;dXNlckBleGFtcGxlLmNvbQ==l&amp;lt;/span&amp;gt;&lt;/code&gt;
&lt;br /&gt;&lt;br /&gt;Which is not something most if not all spam crawlers will understand. While loading the page the JavaScript code will restore the address back into a human readable fashion.
&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Installing&lt;/h3&gt;
To install just run
&lt;br /&gt;&lt;code&gt;&lt;br /&gt;script/plugin install svn://svn.sig11.org/mephisto_obfuscate&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After this, add the javascript include statements into your layout:
&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{{ 'obfuscate' | javascript }}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;That's it, you're done.</description>
    
    
    
          <comments>http://scox.info/post/2007/4/23/mephisto-obfuscation-plugin#comment-form</comments>
      <wfw:comment>http://scox.info/post/2007/4/23/mephisto-obfuscation-plugin#comment-form</wfw:comment>
      <wfw:commentRss>http://scox.info/feed/rss2/comments/3</wfw:commentRss>
      </item>
    
</channel>
</rss>