Skip to content

kulikala/hexo-helper-htmlentities

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

hexo-helper-htmlentities

node npm version npm downloads GitHub release MIT License

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:

&lt;&gt;&quot;&amp;&copy;&circledR;∆

Make sure to use <%- htmlentities() %> and not <%= htmlentities() %> to prevent EJS from escaping the generated string.

About

Hexo helper plugin for encoding html entities.

Resources

License

Stars

Watchers

Forks

Packages

No packages published