$ npm install ent
Encode and decode HTML entities
var ent = require('ent');
console.log(ent.encode('<span>©moo</span>'))
console.log(ent.decode('π & ρ'));
<span>©moo</span>
π & ρ
Escape unsafe characters in str
with html entities.
Convert html entities in str
back to raw text.
HTML entity tables shamelessly lifted from perl's HTML::Entities
With npm do:
npm install ent
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE