<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: e code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 27 Jul 2008 03:14:33 GMT</pubDate>
    <description>DZone Snippets: e code</description>
    <item>
      <title>Obfuscate email addresses in TextMate</title>
      <link>http://snippets.dzone.com/posts/show/3918</link>
      <description>// Textmate / e command for obfuscating email addresses&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/usr/bin/env ruby&lt;br /&gt;&lt;br /&gt;email = STDIN.read&lt;br /&gt;url_email = email.gsub(/./) { |c| '%' + c.unpack('H2' * c.size).join('%').upcase }&lt;br /&gt;html_email = url_email[1..-1].split(/%/).collect { |c| sprintf("&amp;#%03d;", c.to_i(16)) }.join&lt;br /&gt;&lt;br /&gt;print "&lt;a href=\"mailto:#{url_email}\"&gt;#{html_email}&lt;/a&gt;"&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 27 Apr 2007 01:24:07 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3918</guid>
      <author>fauxparse (Matt Powell)</author>
    </item>
  </channel>
</rss>
