Easily mask your mailto-links with Carnival. Make the spambots' lifes hard by hiding your real address.
Inspired by http://www.jottings.com/obfuscator/
Add this line to your application's Gemfile:
gem 'carnival'
And then execute:
$ bundle
Or install it yourself as:
$ gem install carnival
Use Carnival in your views like this:
carnival '[email protected]'
This will create an obfuscated mailto-link with the address as the link text. If you want a custom link text, pass it as a second parameter:
carnival '[email protected]', 'Contact us!
The decoder relies on JavaScript to work. If your users have JS disabled, a hint will be shown that they need to enable JS in order to view the address.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request