v0.2.1 修正util问题

This commit is contained in:
Zongmin Lei
2015-05-06 00:45:28 +08:00
parent 4b20d207e3
commit d021705d99
4 changed files with 8 additions and 8 deletions

8
dist/xss.js vendored
View File

@@ -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

File diff suppressed because one or more lines are too long

View File

@@ -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, '');

View File

@@ -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",