sanitize-html
Advanced tools
Comparing version 1.27.4 to 1.27.5
## 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`. |
{ | ||
"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
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
1682518
26729
573