A wrapper for calling

npm install htmlsanitizer
2 downloads in the last day
143 downloads in the last week
439 downloads in the last month


A simple wrapper for calling (which itself is a wrapper for calling bleach.clean from the python bleach library)


Install with npm install htmlsanitizer

Default options

  text: null,
  tags: [
  attributes: {
    a: ['href', 'title'],
    abbr: ['title'],
    acronym: ['title'],
  styles: [],
  strip: false,
  stripComments: true  
htmlsanitizer(String, callback) // use the defaults
htmlsanitizer(Object, callback) // override some or all of the defaults

callback has the classic signature function (error, safehtml)

npm loves you