diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e6e1b93..2341670 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -878,4 +878,8 @@ module ApplicationHelper render :file => 'shared/noosfero_layout_features' end + def link_to_email(email) + javascript_tag('var array = ' + email.split('@').to_json + '; document.write("" + array.join("@") + "")') + end + end diff --git a/app/views/profile/_person.rhtml b/app/views/profile/_person.rhtml index 3c85373..002c4aa 100644 --- a/app/views/profile/_person.rhtml +++ b/app/views/profile/_person.rhtml @@ -12,7 +12,7 @@ <%= display_field(_('Address:'), profile, :address) %> <%= display_field(_('ZIP code:'), profile, :zip_code) %> <%= display_field(_('Contact phone:'), profile, :contact_phone) %> - <%= display_field(_('e-Mail:'), profile, :email) { |email| link_to email, 'mailto:'+email } %> + <%= display_field(_('e-Mail:'), profile, :email) { |email| link_to_email(email) } %> <% end %> <%= display_field(_('Location:'), profile, :location) %> -- libgit2 0.21.2