k4 / k4encodeemails
A simple plugin that allows you to encode email addresses in your CMS content.
2.3.2
2022-04-21 14:42 UTC
Requires
- craftcms/cms: ^3.0.0-RC1 || ^4.0.0-beta.1
This package is auto-updated.
Last update: 2024-10-21 20:54:56 UTC
README
Plugin that allows you to encode emailaddresses in your CMS content.
Installation
To install k4encodeEmails, follow these steps:
- Navigate to your projects root folder and install the plugin with composer: composer require k4/k4encodeemails
- -OR- do a
git clone https://bitbucket.org/kreisvierdigital/k4encodeemails/k4encodeemails.git
directly into yourcraft/plugins
folder. You can then update it withgit pull
- -OR- install with Composer via
composer require https://bitbucket.org/kreisvierdigital/k4encodeemails/k4encodeemails
- Install plugin in the Craft Control Panel under Settings > Plugins
- The plugin folder should be named
k4encodeemails
for Craft to see it. GitHub recently started appending-master
(the branch name) to the name of the folder for zip file downloads.
k4encodeEmails requires Craft 3 Release Candidate 1 (RC1) or later to work correctly.
k4encodeEmails Overview
Plugin that allows you to encode email addresses in your rendered template content so they are less likely to be harvested by bots.
Using k4encodeEmails
Add to your template:
<p>{{ entry.body |encodeEmails|raw }}</p>
In this example, all emailaddresses in entry.body are encoded, both in text and mailto-links.
Brought to you by Stefan Friedrich