Socket
Socket
Sign inDemoInstall

hast-util-sanitize

Package Overview
Dependencies
1
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

6

lib/github.json

@@ -11,6 +11,2 @@ {

"ancestors": {
"li": [
"ol",
"ul"
],
"tbody": [

@@ -64,4 +60,2 @@ "table"

"h6",
"h7",
"h8",
"br",

@@ -68,0 +62,0 @@ "b",

6

lib/index.js

@@ -335,6 +335,6 @@ 'use strict'

function handleCommentValue(schema, value) {
var val = typeof value === 'string' ? value : ''
var index = val.indexOf(commentEnd)
var result = typeof value === 'string' ? value : ''
var index = result.indexOf(commentEnd)
return index === -1 ? val : val.slice(0, index)
return index === -1 ? result : result.slice(0, index)
}

@@ -341,0 +341,0 @@

{
"name": "hast-util-sanitize",
"version": "2.0.2",
"version": "2.0.3",
"description": "hast utility to sanitize nodes",

@@ -42,12 +42,12 @@ "license": "MIT",

"nyc": "^15.0.0",
"prettier": "^1.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"tape": "^4.0.0",
"prettier": "^2.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"tape": "^5.0.0",
"tinyify": "^2.0.0",
"unist-builder": "^2.0.0",
"xo": "^0.27.0"
"xo": "^0.32.0"
},
"scripts": {
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"format": "remark . -qfo && prettier . --write && xo --fix",
"build-bundle": "browserify . -s hastUtilSanitize > hast-util-sanitize.js",

@@ -54,0 +54,0 @@ "build-mangle": "browserify . -s hastUtilSanitize -p tinyify > hast-util-sanitize.min.js",

@@ -293,2 +293,7 @@ # hast-util-sanitize

## Related
* [`rehype-sanitize`](https://github.com/rehypejs/rehype-sanitize)
— [rehype](https://github.com/rehypejs/rehype) plugin wrapper
## Contribute

@@ -342,7 +347,7 @@

[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
[contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
[support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md

@@ -371,3 +376,3 @@ [tree]: https://github.com/syntax-tree/unist#tree

[github]: https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/sanitization_filter.rb
[github]: https://github.com/jch/html-pipeline/blob/HEAD/lib/html/pipeline/sanitization_filter.rb

@@ -374,0 +379,0 @@ [xss]: https://en.wikipedia.org/wiki/Cross-site_scripting

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