sanitize-html
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -152,2 +152,6 @@ var htmlparser = require('htmlparser2'); | ||
var frame = stack.pop(); | ||
if (!frame) { | ||
// Do not crash on bad markup | ||
return; | ||
} | ||
skipText = false; | ||
@@ -154,0 +158,0 @@ depth--; |
{ | ||
"name": "sanitize-html", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -167,2 +167,4 @@ # sanitize-html | ||
1.2.1: fixed crashing bug when presented with bad markup. The bug was in the `exclusiveFilter` mechanism. Unit test added. Thanks to Ilya Kantor for catching it. | ||
1.2.0: | ||
@@ -169,0 +171,0 @@ |
@@ -193,3 +193,11 @@ var assert = require("assert"); | ||
}); | ||
it('should not crash on bad markup', function() { | ||
assert.equal( | ||
sanitizeHtml( | ||
"<p a" | ||
), | ||
'' | ||
); | ||
}); | ||
}); | ||
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
31933
439
215