scribe-plugin-sanitizer

0.1.11 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.11181latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.11181
0.1.101,927
0.1.91
0.1.82
0.1.71
0.1.62
0.1.50
0.1.41
0.1.31

Package Sidebar

Install

npm i scribe-plugin-sanitizer

Weekly Downloads

2,116

Version

0.1.11

License

none

Unpacked Size

4.12 kB

Total Files

7

Last publish

Collaborators

  • hmgibson23
  • jamespamplin
  • oliverjash
  • rrees
  • scribe-dev
  • theefer