Sanitize html, for browser environments
npm install browser-sanitize-htmlSanitize html, for browser environments.
Allow only divs and clear style attributes:
``js
var sanitize = require('browser-sanitize-html');
var domify = require('domify');
var dirty = domify('
Installation
Install with npm
`bash
npm install browser-sanitize-html
`and bundle with browserify.
API
$3
Sanitize
dirty dom through your provided filter function. The return
value will be null, one Element or a Fragment, depending on which
Elements matched.When
filter returns false` for an element it will be removed from the resultMIT.