v0.2.1 修正util问题
This commit is contained in:
8
dist/xss.js
vendored
8
dist/xss.js
vendored
@@ -651,7 +651,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
trim: function (str) {
|
||||
if (String.prototype.forEach) {
|
||||
if (String.prototype.trim) {
|
||||
return str.trim();
|
||||
}
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
@@ -1470,14 +1470,14 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
trim: function (str) {
|
||||
if (String.prototype.forEach) {
|
||||
if (String.prototype.trim) {
|
||||
return str.trim();
|
||||
}
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
},
|
||||
trimRight: function (str) {
|
||||
if (String.prototype.forEach) {
|
||||
return str.trim();
|
||||
if (String.prototype.trimRight) {
|
||||
return str.trimRight();
|
||||
}
|
||||
return str.replace(/(\s*$)/g, '');
|
||||
}
|
||||
|
||||
2
dist/xss.min.js
vendored
2
dist/xss.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -21,7 +21,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
trim: function (str) {
|
||||
if (String.prototype.forEach) {
|
||||
if (String.prototype.trim) {
|
||||
return str.trim();
|
||||
}
|
||||
return str.replace(/(^\s*)|(\s*$)/g, '');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "xss",
|
||||
"main": "./lib/index.js",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"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.1.x",
|
||||
"cssfilter": "0.0.3"
|
||||
"cssfilter": "0.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"blanket": "1.1.5",
|
||||
|
||||
Reference in New Issue
Block a user