v0.2.2 update cssfilter@0.0.5

This commit is contained in:
Zongmin Lei
2015-05-24 23:35:42 +08:00
parent ef63015a0e
commit 467bfe1c8c
3 changed files with 50 additions and 50 deletions

94
dist/xss.js vendored
View File

@@ -854,50 +854,7 @@ FilterXSS.prototype.process = function (html) {
module.exports = FilterXSS;
},{"./default":1,"./parser":3,"./util":4,"cssfilter":6}],6:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<leizongmin@gmail.com>
*/
var DEFAULT = require('./lib/default');
var FilterCSS = require('./lib/css');
/**
* XSS过滤
*
* @param {String} css 要过滤的CSS代码
* @param {Object} options 选项whiteList, onAttr, onIgnoreAttr
* @return {String}
*/
function filterCSS (html, options) {
var xss = new FilterCSS(options);
return xss.process(html);
}
// 输出
exports = module.exports = filterCSS;
exports.FilterCSS = FilterCSS;
for (var i in DEFAULT) exports[i] = DEFAULT[i];
// 在AMD下使用
if (typeof define === 'function' && define.amd) {
define(function () {
return module.exports;
});
}
// 在浏览器端使用
if (typeof window !== 'undefined') {
window.filterCSS = module.exports;
}
},{"./lib/css":7,"./lib/default":8}],7:[function(require,module,exports){
},{"./default":1,"./parser":3,"./util":4,"cssfilter":8}],6:[function(require,module,exports){
/**
* cssfilter
*
@@ -954,7 +911,7 @@ FilterCSS.prototype.process = function (css) {
var isWhite = false;
if (check === true) isWhite = check;
else if (typeof check === 'function') isWhite = check(value);
else if (check instanceof RegExp) isWhite = check.test(val);
else if (check instanceof RegExp) isWhite = check.test(value);
if (isWhite !== true) isWhite = false;
var opts = {
@@ -989,7 +946,7 @@ FilterCSS.prototype.process = function (css) {
module.exports = FilterCSS;
},{"./default":8,"./parser":9,"./util":10}],8:[function(require,module,exports){
},{"./default":7,"./parser":9,"./util":10}],7:[function(require,module,exports){
/**
* cssfilter
*
@@ -1370,7 +1327,50 @@ exports.whiteList = whiteList;
exports.onAttr = onAttr;
exports.onIgnoreAttr = onIgnoreAttr;
},{}],9:[function(require,module,exports){
},{}],8:[function(require,module,exports){
/**
* cssfilter
*
* @author 老雷<leizongmin@gmail.com>
*/
var DEFAULT = require('./default');
var FilterCSS = require('./css');
/**
* XSS过滤
*
* @param {String} css 要过滤的CSS代码
* @param {Object} options 选项whiteList, onAttr, onIgnoreAttr
* @return {String}
*/
function filterCSS (html, options) {
var xss = new FilterCSS(options);
return xss.process(html);
}
// 输出
exports = module.exports = filterCSS;
exports.FilterCSS = FilterCSS;
for (var i in DEFAULT) exports[i] = DEFAULT[i];
// 在AMD下使用
if (typeof define === 'function' && define.amd) {
define(function () {
return module.exports;
});
}
// 在浏览器端使用
if (typeof window !== 'undefined') {
window.filterCSS = module.exports;
}
},{"./css":6,"./default":7}],9:[function(require,module,exports){
/**
* cssfilter
*

2
dist/xss.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
{
"name": "xss",
"main": "./lib/index.js",
"version": "0.2.1",
"version": "0.2.2",
"description": "Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist. 根据白名单过滤HTML(防止XSS攻击)",
"author": "leizongmin <leizongmin@gmail.com> (http://ucdok.com)",
"contributors": [
@@ -19,7 +19,7 @@
},
"dependencies": {
"commander": "2.8.x",
"cssfilter": "0.0.4"
"cssfilter": "0.0.5"
},
"devDependencies": {
"blanket": "1.1.5",