innoweb / silverstripe-email-obfuscator
Obfuscates all email addresses displayed on the site. Email addresses are revealed using Javascript.
Package info
github.com/xini/silverstripe-email-obfuscator
Type:silverstripe-vendormodule
pkg:composer/innoweb/silverstripe-email-obfuscator
Requires
- masterminds/html5: ^2.10.0
- silverstripe/cms: ^6
- silverstripe/vendor-plugin: ^3
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Overview
Obfuscates all email addresses displayed on the site. Email addresses are revealed using Javascript.
Thanks to Plato for some inspiration.
Requirements
- Silverstripe CMS 6
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