sanitize-html
Advanced tools
Comparing version 1.10.0 to 1.10.1
{ | ||
"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 @@ |
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
49458
347