33
34
35
36
37
38
39
40
41
42
|
# File 'lib/recaptcha.rb', line 33
def mail_hide(address, contents=nil)
contents = truncate(address,10) if contents.nil?
k = ReCaptcha::MHClient.new(MH_PUB, MH_PRIV)
enciphered = k.encrypt(address)
uri = "http://mailhide.recaptcha.net/d?k=#{MH_PUB}&c=#{enciphered}"
t =" <a href=\"\#{uri}\"\n onclick=\"window.open('\#{uri}', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">\#{contents}</a>\n"
end
|