Comparing version 0.1.14 to 0.1.15
@@ -210,3 +210,3 @@ /** | ||
function escapeQuote (str) { | ||
return str.replace(REGEXP_QUOTE, '"e;'); | ||
return str.replace(REGEXP_QUOTE, '"'); | ||
} | ||
@@ -213,0 +213,0 @@ |
{ | ||
"name": "xss", | ||
"main": "./lib/index.js", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist. 根据白名单过滤HTML(防止XSS攻击)", | ||
@@ -6,0 +6,0 @@ "author": "leizongmin <leizongmin@gmail.com> (http://ucdok.com)", |
@@ -47,7 +47,7 @@ /** | ||
assert.equal(xss('<a title=\'abcd\'>'), '<a title="abcd">'); | ||
assert.equal(xss('<a title=\'"\'>'), '<a title=""e;">'); | ||
assert.equal(xss('<a title=\'"\'>'), '<a title=""">'); | ||
// 没有双引号括起来的属性值 | ||
assert.equal(xss('<a title=home>'), '<a title="home">'); | ||
assert.equal(xss('<a title=abc("d")>'), '<a title="abc("e;d"e;)">'); | ||
assert.equal(xss('<a title=abc("d")>'), '<a title="abc("d")">'); | ||
assert.equal(xss('<a title=abc(\'d\')>'), '<a title="abc(\'d\')">'); | ||
@@ -54,0 +54,0 @@ |
205504