npm install html-purifyHTML5 Purify
====================
HTML5 Purifier - a fast and small footprint HTML5 purifier. The module uses a whitelist based approach to filter malicious characters,tags, attributes and attribute values while keeping the resulting output HTML5 compliant. It uses context parser for parsing the input string, xss filters for filtering URI attribute values and css-js for filtering CSS data within the HTML input.
[![npm version][npm-badge]][npm]
[![dependency status][dep-badge]][dep-status]

[npm]: https://www.npmjs.org/package/html-purify
[npm-badge]: https://img.shields.io/npm/v/html-purify.svg?style=flat-square
[dep-status]: https://david-dm.org/yahoo/html-purify
[dep-badge]: https://img.shields.io/david/yahoo/html-purify.svg?style=flat-square
Install html-purify from the npm repo
``shell`
npm install html-purify
Server side use(nodejs)
`js
/ create the html purifier /
var Purifier = require('html-purify');
var purifier = new Purifier();
var input = '...';
/ filter the input string /
var result = purifier.purify(input);
`
shell
npm install
npm run-script build
`$3
`shell
npm test
``This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.
[LICENSE file]: ./LICENSE