Socket
Socket
Sign inDemoInstall

sanitize-html

Package Overview
Dependencies
Maintainers
15
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.11.0 to 1.11.1

3

index.js

@@ -224,4 +224,5 @@ var htmlparser = require('htmlparser2');

skipText = false;
} else {
return;
}
return;
}

@@ -228,0 +229,0 @@

{
"name": "sanitize-html",
"version": "1.11.0",
"version": "1.11.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",

@@ -272,2 +272,4 @@ # sanitize-html

1.11.1: fixed a regression introduced in 1.11.0 which caused the closing tag of the parent of a `textarea` tag to be lost. Thanks to Stefano Sala, who contributed the missing test.
1.11.0: added the `nonTextTags` option, with tests.

@@ -274,0 +276,0 @@

@@ -49,2 +49,5 @@ var assert = require("assert");

});
it('should drop the content of textarea elements but keep the closing parent tag, when nested', function() {
assert.equal(sanitizeHtml('<p>Paragraph<textarea>Nifty</textarea></p>'), '<p>Paragraph</p>');
});
it('should retain the content of fibble elements by default', function() {

@@ -51,0 +54,0 @@ assert.equal(sanitizeHtml('<fibble>Nifty</fibble><p>Paragraph</p>'), 'Nifty<p>Paragraph</p>');

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