resanitize
Advanced tools
Comparing version 0.1.7 to 0.1.8
{ "name" : "resanitize" | ||
, "author" : "Dan MacTough <danmactough@gmail.com>" | ||
, "description" : "Regular expression-based HTML sanitizer and ad remover, geared toward RSS feed descriptions" | ||
, "version" : "0.1.7" | ||
, "version" : "0.1.8" | ||
, "keywords" : ["sanitize", "html", "regexp", "security"] | ||
@@ -6,0 +6,0 @@ , "homepage" : "http://github.com/danmactough/node-resanitize" |
@@ -16,3 +16,3 @@ /*! | ||
* | ||
* @param {String} HTML string to sanitize | ||
* @param {String|Buffer} HTML string to sanitize | ||
* @return {String} sanitized HTML | ||
@@ -22,2 +22,10 @@ * @api public | ||
function resanitize (str) { | ||
if ('string' !== typeof str) { | ||
if (Buffer.isBuffer(str)) { | ||
str = str.toString(); | ||
} | ||
else { | ||
throw new TypeError('Invalid argument: must be String or Buffer'); | ||
} | ||
} | ||
str = stripAsciiCtrlChars(str); | ||
@@ -24,0 +32,0 @@ str = fixSpace(str); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13310
5
235