Hexo helper plugin for encoding html entities.
npm install hexo-helper-htmlentities[Hexo] helper plugin for encoding html entities.
This plugin uses AllHtmlEntities class of [node-html-entities].
`` bash`
$ npm install hexo-helper-htmlentities --save
Add htmlentities tag in your EJS template:
`ejs`
<%- htmlentities('<>"&©®∆') %>
The helper will generate encoded html entities like this:
`html`
<>"&©®∆
Make sure to use <%- htmlentities() %> and not <%= htmlentities() %>` to prevent EJS from escaping the generated string.
[Hexo]: http://hexo.io/
[node-html-entities]: https://github.com/mdevils/node-html-entities