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.10.0 to 1.10.1

2

package.json
{
"name": "sanitize-html",
"version": "1.10.0",
"version": "1.10.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",

@@ -44,3 +44,3 @@ # sanitize-html

"I like your set but I want to add one more tag. Is there a convenient way?" Sure:
#### "I like your set but I want to add one more tag. Is there a convenient way?" Sure:

@@ -53,3 +53,3 @@ clean = sanitizeHtml(dirty, {

"What are the default options?"
#### "What are the default options?"

@@ -71,3 +71,3 @@ allowedTags: [ 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol',

"What if I want to allow all tags or all attributes?"
#### "What if I want to allow all tags or all attributes?"

@@ -80,2 +80,9 @@ Simple! instead of leaving `allowedTags` or `allowedAttributes` out of the options, set either

#### "What if I don't want to allow *any* tags?"
Also simple! Set your `allowedTag` and `allowedAttributes` to empty arrays (`[]`).
allowedTags: [],
allowedAttributes: []
### Wildcards for attributes

@@ -253,2 +260,4 @@

1.10.1: documentation cleanup. No code changes. Thanks to Rex Schrader.
1.10.0: `allowedAttributes` now allows you to allow attributes for all tags by specifying `*` as the tag name. Thanks to Zdravko Georgiev.

@@ -255,0 +264,0 @@

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