hexo-helper-htmlentities
v1.0.0
Published
Hexo helper plugin for encoding html entities.
Downloads
3
Readme
hexo-helper-htmlentities
Hexo helper plugin for encoding html entities.
This plugin uses AllHtmlEntities
class of node-html-entities.
Installation
$ npm install hexo-helper-htmlentities --save
Usage
Add htmlentities
tag in your EJS template:
<%- htmlentities('<>"&©®∆') %>
The helper will generate encoded html entities like this:
<>"&©®∆
Make sure to use <%- htmlentities() %>
and not <%= htmlentities() %>
to prevent EJS from escaping the generated string.