New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

middleman-protect-emails

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middleman-protect-emails

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

middleman-protect-emails

Build Status Code Climate Test Coverage

middleman-protect-emails is a Middleman extension that encrypts email links on your page on the server-side and decodes them on the client-side, avoiding spam bots with no visible impacts to your users.

This gem makes use of the ROT13 encryption algorithm to encrypt email links. Users must have Javascript enabled on their computers for the decoding stage to work.

Installation

Add this line to your Middleman application's Gemfile:

gem 'middleman-protect-emails'

And then run:

$ bundle

Usage

Using this gem is as simple as adding the following line to your project's config.rb file:

activate :protect_emails

And that's it! This will now protect all mailto links in your Middleman project.

How it Works

If the middleware detects a mailto link on your page, it will automatically replace the link with an encrypted hash and insert a small script at the end of the page for the browser to decode it on page load. For example, if the following code was on one of your pages:

<a href='mailto:hello@example.com'>Link</a>

It would automatically be replaced with:

<a href='#email-protection-uryyb@rknzcyr.pbz'>Link</a>

This extension also encrypts link parameters (ex. mailto:hello@example.com?subject=Some%20Subject).

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new pull request

FAQs

Package last updated on 15 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc