1.0.1 • Published 9 years ago

encode-html v1.0.1

Weekly downloads
42
License
MIT
Repository
github
Last release
9 years ago

encode-html

  • encode html entities
  • tiny function that replaces "<", ">", "''", "&" with html entities

install

npm install encode-html

use

var encode = require('encode-html');

console.log(encode('<div class="hidden">NON&SENSE\'s</div>'));
// -> '&lt;div class="hidden"&gt;NON&amp;SENSE&apos;s&lt;/div&gt;'

(opposite) decode function decode-html

test

npm test

license

MIT

author

Andi Neck | @andineck | intesso