gulp-angular-xss

0.2.4 • Public • Published

gulp-angular-xss

Anti-xss gulp plugin for angular. Optionally prohibits the use of ng-bind-html.

First install gulp-angular-xss

npm install --save-dev gulp-angular-xss

Usage:

var xss = require('gulp-angular-xss');
 
gulp.src('invalid.html')
    .pipe(xss());

Options:

gulp.task('invalidWithExceptionAndFilter', function () {
    gulp.src('invalid.html')
        .pipe(xss({
            // treat matches as error
            error: false,
            // filter out based on file path and value
            exceptions: [
                // ng-bind-html="badXss" from invalid.html will be filtered out
                {path: "invalid.html", value: "badXss"}
            ],
            // filter out based on filter value
            supportedFilters: [
                // attributes like ng-bind-html="something | myfilter: something" will be filtered out
                "myfilter"
            ]
        }));
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.00beta
0.2.424latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.424
0.2.30
0.2.20
0.2.10
0.2.00
0.1.00

Package Sidebar

Install

npm i gulp-angular-xss

Weekly Downloads

24

Version

0.2.4

License

MIT

Last publish

Collaborators

  • kazhu
  • mgabor