0.1.11 • Published 5 years ago

scribe-plugin-sanitizer v0.1.11

Weekly downloads
468
License
-
Repository
github
Last release
5 years ago

scribe-plugin-sanitizer

**NB: this project is no longer distributed over Bower. Please use npm for future versions

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.

0.1.11

5 years ago

0.1.10

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

10 years ago