Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sanitize-html

Package Overview
Dependencies
Maintainers
15
Versions
114
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.27.4 to 1.27.5

3

CHANGELOG.md
## Changelog
1.27.5 (2020-09-23):
- Updates README to include ES modules syntax.
1.27.4 (2020-08-26):

@@ -4,0 +7,0 @@ - Fixes an IE11 regression from using `Array.prototype.includes`, replacing it with `Array.prototype.indexOf`.

6

package.json
{
"name": "sanitize-html",
"version": "1.27.4",
"version": "1.27.5",
"description": "Clean up user-submitted HTML, preserving whitelisted elements and whitelisted attributes on a per-element basis",

@@ -41,3 +41,3 @@ "sideEffects": false,

"eslint": "^4.0.0",
"eslint-config-apostrophe": "^3.1.0",
"eslint-config-apostrophe": "3.3.0",
"eslint-config-standard": "^11.0.0",

@@ -52,2 +52,2 @@ "eslint-plugin-import": "^2.13.0",

}
}
}

@@ -74,11 +74,19 @@ # sanitize-html

Use it in your node app:
Import the module:
```js
var sanitizeHtml = require('sanitize-html');
```bash
// In ESM
import sanitizeHtml from 'sanitize-html';
var dirty = 'some really tacky HTML';
var clean = sanitizeHtml(dirty);
// Or in CJS
const sanitizeHtml = require('sanitize-html');
```
Use it in your JavaScript app:
```js
const dirty = 'some really tacky HTML';
const clean = sanitizeHtml(dirty);
```
That will allow our default list of allowed tags and attributes through. It's a nice set, but probably not quite what you want. So:

@@ -85,0 +93,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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