1.1.4 • Published 4 years ago

think-purify v1.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

think-purify

npm Build Status Coverage Status

Use the HTML5 Purify extension in ThinkJS

How to use

Install

npm install think-purify --save

Configure extends.js

const purify = require('think-purify')

module.exports = [
  purify
];

Use in controller, service, context or think

module.exports = class extends Base {
  indexAction() {
    const html = this.post('html');
    const result = this.purify(html); // Filtering dangerous html tags and attributes
    return this.display();
  }
};
1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago