innoweb/silverstripe-email-obfuscator

Obfuscates all email addresses displayed on the site. Email addresses are revealed using Javascript.

Installs: 796

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:silverstripe-vendormodule

3.3.0 2024-11-25 04:10 UTC

This package is auto-updated.

Last update: 2024-12-25 04:15:55 UTC


README

Version License

Overview

Obfuscates all email addresses displayed on the site. Email addresses are revealed using Javascript.

Thanks to Plato for some inspiration.

Requirements

  • Silverstripe CMS 5.x

Note: this version is compatible with SilverStripe 5. For SilverStripe 4, please see the 2 release line.

Installation

Install the module using composer:

composer require innoweb/silverstripe-email-obfuscator dev-master

and run dev/build.

Usage

All email addresses on a page get obfuscated by a middleware and then rewritten back to email links via Javascript.

If you need to skip obfuscation of certain links, you can add the skip-email-obfuscation class to their tag.

This is useful for e.g. Mastodon links that are falsly recognised as emails:

<a href="https://mastodon.social/@sminnee@mastodon.nz" class="skip-email-obfuscation">Sam Minnée on Mastodon</a>

License

BSD 3-Clause License, see License