Socket
Socket
Sign inDemoInstall

posthtml-obfuscate

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    posthtml-obfuscate

PostHTML plugin that'll obfuscate emails etc...


Version published
Weekly downloads
431
increased by9.39%
Maintainers
1
Install size
44.9 kB
Created
Weekly downloads
 

Readme

Source

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)

Keywords

FAQs

Last updated on 20 Sep 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc