Description
This plugin will encode the characters of a string into their hex equivalent making it a very simple way to obfuscate data such as e-mail addresses that you do not want to expose to crawlers or e-mail spammers.
Installation and Setup
In your global /WEB-INF/plugin.properties file, add the following line:
simple-obfuscation=org.blojsom.plugin.obfuscation.SimpleObfuscationPlugin
You may then add "simple-obfuscation" to the end one of the flavor-based plugin chains. These plugin chains can be found in the individual user's plugin.properties file. For example:
html.blojsom-plugin-chain=...,simple-obfuscation
Usage and URL Parameters
There are no URL parameters to control the operation of the Simple Obfuscation plugin.
Context Attributes and Types
The following table describes the context attributes that are available and their associated type.
| Context key |
Input or Output |
Type |
Description |
| BLOJSOM_PLUGIN_SIMPLE_OBFUSCATION |
Output |
org.blojsom.plugin.obfuscation.SimpleObfuscationPlugin object |
You may then make use of the obfuscate method in your templates. If a null value is passed to the obfuscate method, a null is returned. If a blank value is passed to the obfuscate, a blank value is returned. Otherwise, the obfuscate method will return a string of the form %xx.... |