This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added url filter - added base url resolver - broken down functions into separate files - removed browserify
- Loading branch information
adon
committed
Nov 2, 2015
1 parent
5aa08c5
commit 04041bf
Showing
20 changed files
with
2,590 additions
and
1,916 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "xss-filters", | ||
"version": "1.2.6", | ||
"version": "2.0.0", | ||
"licenses": [ | ||
{ | ||
"type": "BSD", | ||
|
@@ -23,7 +23,7 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"main": "src/xss-filters.js", | ||
"main": "src/index-node.js", | ||
"scripts": { | ||
"test": "grunt test", | ||
"hint": "grunt jshint", | ||
|
@@ -47,7 +47,6 @@ | |
"devDependencies": { | ||
"expect.js": "^0.3.1", | ||
"grunt": "^0.4.5", | ||
"grunt-browserify": "^3.8.0", | ||
"grunt-cli": "^0.1.13", | ||
"grunt-contrib-clean": "^0.6.0", | ||
"grunt-contrib-copy": "^0.7.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
Copyright (c) 2015, Yahoo! Inc. All rights reserved. | ||
Copyrights licensed under the New BSD License. | ||
See the accompanying LICENSE file for terms. | ||
Authors: Adonis Fung <[email protected]> | ||
Nera Liu <[email protected]> | ||
Albert Yu <[email protected]> | ||
*/ | ||
|
||
// This file is used only for building the min version with uglify | ||
/*jshint esnext: true *//*jshint -W079 *//*jshint unused:false*/ | ||
const require = false; | ||
|
||
exports._privFilters = { | ||
urlFilters: (exports.urlFilters = {}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
Copyright (c) 2015, Yahoo! Inc. All rights reserved. | ||
Copyrights licensed under the New BSD License. | ||
See the accompanying LICENSE file for terms. | ||
Authors: Nera Liu <[email protected]> | ||
Adonis Fung <[email protected]> | ||
Albert Yu <[email protected]> | ||
*/ | ||
/** | ||
* The following file serves the node.js version | ||
*/ | ||
|
||
/*jshint node: true */ | ||
|
||
// populate the xss filters | ||
module.exports = exports = require('./lib/xssFilters'); | ||
|
||
exports._privFilters.yHtmlDecode = require('./lib/htmlDecode').yHtmlDecode; | ||
|
||
// the following is largely designed for secure-handlebars-helpers | ||
exports._getPrivFilters = { | ||
toString : function() { | ||
var fs = require('fs'); | ||
return '(function(){var xssFilters={},exports={};' + | ||
fs.readFileSync('./src/lib/htmlDecode.js', 'utf8') + | ||
fs.readFileSync('./src/lib/xssFilters.priv.js', 'utf8') + | ||
'return exports;})'; | ||
} | ||
}; | ||
|
||
|
||
exports.urlFilters = require('./lib/urlFilters'); | ||
exports.urlFilters.yUrlResolver = require('./lib/urlResolver').yUrlResolver; |
Oops, something went wrong.