Socket
Socket
Sign inDemoInstall

sanitize-html

Package Overview
Dependencies
Maintainers
10
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sanitize-html - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

index.js

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

2

package.json
{
"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"
),
''
);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc