Browse Source

added back html_email obfusticator

unreleased_contents
B Mathis 15 years ago
parent
commit
bd96f301ef
  1. 9
      source/_helpers.rb

9
source/_helpers.rb

@ -113,6 +113,15 @@ module Helpers
# My added helpers # My added helpers
def to_html_email(address)
email = string_to_html(address)
"<a href=\"#{string_to_html('mailto:')}#{email}\">#{email}</a>"
end
def string_to_html(s)
s.strip.unpack("C*").map{|ch| "&#" + ch.to_s + ";" }.to_s
end
def show_part (file) def show_part (file)
data = '' data = ''
f = File.open(Dir.pwd+"/source/"+file) f = File.open(Dir.pwd+"/source/"+file)

Loading…
Cancel
Save