egg-html-purify
v1.0.2
Published
HTML5 Purifier plugin for egg.js
Downloads
3
Maintainers
Readme
egg-html-purify
HTML5 Purifier plugin for egg.js
The plugin uses a whitelist based approach to filter malicious characters,tags, attributes and attribute values while keeping the resulting output HTML5 compliant.
Install
$ npm i egg-html-purify --save
Usage
// {app_root}/config/plugin.js
exports.htmlPurify = {
enable: true,
package: 'egg-html-purify',
};
Example
this.app.purify(input);
// or use in context
this.ctx.purify(input);
Questions & Suggestions
Please open an issue here.