From bd96f301ef90953c1d59df9493142fcd5ce37c56 Mon Sep 17 00:00:00 2001 From: B Mathis Date: Thu, 12 Nov 2009 14:42:31 -0600 Subject: added back html_email obfusticator --- source/_helpers.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source') diff --git a/source/_helpers.rb b/source/_helpers.rb index 2eca937c..43377dcd 100644 --- a/source/_helpers.rb +++ b/source/_helpers.rb @@ -113,6 +113,15 @@ module Helpers # My added helpers + def to_html_email(address) + email = string_to_html(address) + "#{email}" + end + + def string_to_html(s) + s.strip.unpack("C*").map{|ch| "&#" + ch.to_s + ";" }.to_s + end + def show_part (file) data = '' f = File.open(Dir.pwd+"/source/"+file) -- cgit v1.2.1