Neverending Package Mountain
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

scribe-plugin-sanitizer

0.1.10 • Public • Published

scribe-plugin-sanitizer

Installation

bower install scribe-plugin-sanitizer

Usage Example

scribe-plugin-sanitizer is an AMD module:

require(['scribe', 'scribe-plugin-sanitizer'], function (Scribe, scribePluginSanitizer) {
  var scribeElement = document.querySelector('.scribe');
  var scribe = new Scribe(scribeElement);
  scribe.use(scribePluginSanitizer({
    tags: {
      p: true,
      a: {
        href: true,
        target: '_blank'
      }
    }
  }));
});

It uses the same format of options as html-janitor. To whitelist a tag, specify true for it. To whitelist specific attributes or even specific values, use an object.

Keywords

none

install

npm i scribe-plugin-sanitizer

Downloadsweekly downloads

408

version

0.1.10

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability