0.2.4 • Published 9 years ago

gulp-angular-xss v0.2.4

Weekly downloads
23
License
MIT
Repository
github
Last release
9 years ago

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"
            ]
        }));
});
0.2.4

9 years ago

0.2.3

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago