E-mail Address Obfuscator (txp:dtj_obfuscated_email /)

A simple plugin that encodes ("obfuscates") an e-mail address link for you, helping to reduce the likelihood of your e-mail address getting harvested.

It's quite simple to use. The tag takes an email attribute (the address to be encoded) and an encoding mode (case insensitive).

Download: dtj_obfuscated_email version 0.3

Classification

The dtj_obfuscated_email tag is a Single_Tag. Textpattern will replace this tag with an encoded mailto: link, according to the attributes set.

Attributes

email
The e-mail address to be encoded.
mode
The encoding method to use:
basic
A really basic mode that just encodes the @ symbol and periods.
iso
Encodes the address with ISO character entities.
hex
Encodes the address with Hex character entities.
mixed (default)
Randomly encodes the address using a mix of ISO and Hex encoding methods.

This attribute is not case-sensitive.

output
The type of output required (new to version 0.3):
link (default)
A complete HTML encoded mailto: hyperlink is returned.
plain
Just the encoded e-mail address is returned.

This attribute is not case-sensitive.

Syntax:

<txp:dtj_obfuscated_email email="encoded address" />

Examples

Example 1: Encode with ISO character entities (pretty much as Textpattern's own email tag)

<txp:dtj_obfuscated_email email="noone@example.tld" mode="iso" />

Example 2: Just return a Hex-encoded e-mail address.

<txp:dtj_obfuscated_email email="noone@example.tld" mode="hex" output="plain" />