This commit is contained in:
Zongmin Lei
2014-09-12 12:25:13 +08:00
parent 8a08cea378
commit 817ed8594f
3 changed files with 4 additions and 2 deletions

2
build Executable file
View File

@@ -0,0 +1,2 @@
browserify lib/index.js > dist/xss.js

2
dist/xss.js vendored
View File

@@ -352,7 +352,7 @@ function StripTagBody (tags, next) {
function stripCommentTag (html) {
return html.replace(STRIP_COMMENT_TAG_REGEXP, '');
}
var STRIP_COMMENT_TAG_REGEXP = /<!--(.|\s)*?-->/gm;
var STRIP_COMMENT_TAG_REGEXP = /<!--[\s\S]*?-->/g;
exports.whiteList = whiteList;

View File

@@ -1,7 +1,7 @@
{
"name": "xss",
"main": "./lib/index.js",
"version": "0.1.11",
"version": "0.1.12",
"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": [