This commit is contained in:
Zongmin Lei
2015-08-06 15:56:32 +08:00
parent 2c7651b9f6
commit 594b59baf1
3 changed files with 4 additions and 4 deletions

4
dist/xss.js vendored
View File

@@ -474,8 +474,8 @@ function getTagName (html) {
var tagName = html.slice(1, i + 1);
}
tagName = _.trim(tagName).toLowerCase();
if (tagName[0] === '/') tagName = tagName.slice(1);
if (tagName[tagName.length - 1] === '/') tagName = tagName.slice(0, -1);
if (tagName.slice(0, 1) === '/') tagName = tagName.slice(1);
if (tagName.slice(-1) === '/') tagName = tagName.slice(0, -1);
return tagName;
}

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.5",
"version": "0.2.6",
"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": [