Encode the email addresses in your templates so they can't be harvested by evil spam bots.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
src
.gitignore
CHANGELOG.md
LICENSE.md
README.md
composer.json

README.md

Sprout Encode Email

Encode the email addresses in your templates so they can't be harvested by evil spam bots.

Usage

The rot13 filter (and the easier to remember encode filter) encode the string you pass to them using the Rot13 cipher and return a javascript tag to decode the string on the page.

{% set email = "<a href='mailto:you@example.com'>Your Name</a>" %}

{{ email | encode }}
{{ email | rot13 }}

The entities filter encodes your content into HTML Entities.

<a href='{{ "mailto:you@example.com" | entities }}'>Your Name</a>

Documentation

See the Sprout Website for documentation, guides, and additional resources.

Support