hexo-helper-obfuscate
v1.0.0
Published
Hexo helper plugin for obfuscating strings such as email addresses. Handy against web-crawlers.
Downloads
4
Readme
hexo-helper-obfuscate
Hexo helper plugin for obfuscating strings such as email addresses. Handy against web-crawlers.
Install
npm install hexo-helper-obfuscate --save
Usage
<a href="mailto:<%- obfuscate('[email protected]')" %>>Email</a>
The helper will encode the characters of the string in html entities, randomly choosing between ascii and utf-8 representation. The result will look like this:
<a href="mailto:jdoe@example.com">Email</a>
Make sure to use <%- obfuscate() %>
and not <%= obfuscate() %>
to prevent EJS from escaping the generated string.