Changeset 1249

Show
Ignore:
Timestamp:
2008-11-07 10:08:40 (2 months ago)
Author:
gaspard
Message:

commit 7040b270cd8bc61a9455ae9d58ead8a52d9cac38
Author: Gaspard Bucher <gaspard@teti.ch>

Added '[email].../email' tag to hide email adresses using recaptcha "mail_hide".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/helpers/zazen_test.rb

    r1248 r1249  
    211211    assert current_site.update_attributes(:d_mail_hide_priv => '1234', :d_mail_hide_pub => '3456') 
    212212    @node = secure!(Node) { nodes(:status) } 
    213     assert_match %r{mailhide.recaptcha.net/d\?k=3456&.*window.open}m, zazen("This is an email [email]bob@example.com[/email].") 
     213    assert_match %r{<a href.*mailhide.recaptcha.net/d\?k=3456&.*window.open}m, zazen("This is an email [email]bob@example.com[/email].") 
    214214  end 
    215215end 
  • trunk/vendor/plugins/zena_captcha/patch/application_helper.rb

    r1248 r1249  
    2121    enciphered = k.encrypt(address) 
    2222    uri = "http://mailhide.recaptcha.net/d?k=#{pub_key}&c=#{enciphered}" 
    23     t =<<-EOF 
    24     <a href="#{uri}" 
    25     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> 
    26   EOF 
     23    %{<a href="#{uri}" 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>} 
    2724  end 
    2825