Socket
Socket
Sign inDemoInstall

rehype-sanitize

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

15

package.json
{
"name": "rehype-sanitize",
"version": "2.0.0",
"version": "2.0.1",
"description": "Sanitize HTML with rehype",

@@ -26,3 +26,2 @@ "license": "MIT",

"devDependencies": {
"bail": "^1.0.1",
"browserify": "^14.1.0",

@@ -32,11 +31,8 @@ "deepmerge": "^1.2.0",

"hast-util-sanitize": "^1.1.0",
"is-hidden": "^1.0.1",
"negate": "^1.0.0",
"nyc": "^10.0.0",
"rehype": "^4.0.0",
"nyc": "^11.0.0",
"rehype": "^5.0.0",
"remark-cli": "^3.0.0",
"remark-preset-wooorm": "^2.0.0",
"remark-preset-wooorm": "^3.0.0",
"tape": "^4.0.0",
"to-vfile": "^2.1.1",
"xo": "^0.17.0"
"xo": "^0.18.0"
},

@@ -61,2 +57,3 @@ "scripts": {

"space": true,
"esnext": false,
"ignores": [

@@ -63,0 +60,0 @@ "rehype-sanitize.js"

11

readme.md

@@ -34,3 +34,3 @@ # rehype-sanitize [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov]

```javascript
var vfile = require('to-vfile');
var fs = require('fs');
var rehype = require('rehype');

@@ -41,4 +41,2 @@ var merge = require('deepmerge');

var doc = vfile.readSync('index.html');
var schema = merge(gh, {tagNames: ['math', 'mi']});

@@ -49,3 +47,3 @@

.use(sanitize, schema)
.process(doc, function (err, file) {
.process(fs.readFileSync('index.html'), function (err, file) {
if (err) throw err;

@@ -80,2 +78,7 @@ console.log(String(file));

## Related
* [`hast-util-sanitize`](https://github.com/wooorm/hast-util-sanitize)
— Core utility that does the sanitation
## License

@@ -82,0 +85,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc