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;
}