0.1.5 • Published 8 years ago

posthtml-obfuscate v0.1.5

Weekly downloads
1,030
License
MIT
Repository
github
Last release
8 years ago

PostHTML Obfuscate

NPM version Travis Codecov

Obfuscates emails to make it harder for bots to recognize.

Install

npm i posthtml-obfuscate -D

Output

<!-- Before -->
<a href="mailto:sam@smith.com">
	sam@smith.com
</a>

<!-- After -->
<a href="mailto:&#115;&#97;&#109;&#64;&#115;&#109;&#105;&#116;&#104;&#46;&#99;&#111;&#109;">
	&#115;&#97;&#109;&#64;&#115;&#109;&#105;&#116;&#104;&#46;&#99;&#111;&#109;
</a>

Usage

const posthtml = require('posthtml');
const phObfuscate= require('posthtml-obfuscate');

const options = {
	includeMailto: false
};

posthtml([phObfuscate(options)])
	.process(myHtml)
	.then(result => {
		console.log(result.html); // The output
	});

Options

  • includeMailto: Boolean - Includes the mailto: prefix in the obfuscation. (Default: false)
0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago