Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Obfuscate Email Addresses In TextMate

DZone's Guide to

Obfuscate Email Addresses In TextMate

·
Free Resource
// Textmate / e command for obfuscating email addresses


#!/usr/bin/env ruby

email = STDIN.read
url_email = email.gsub(/./) { |c| '%' + c.unpack('H2' * c.size).join('%').upcase }
html_email = url_email[1..-1].split(/%/).collect { |c| sprintf("&#%03d;", c.to_i(16)) }.join

print "#{html_email}"
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}