Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mdast-util-to-hast

Package Overview
Dependencies
Maintainers
2
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mdast-util-to-hast - npm Package Compare versions

Comparing version 8.1.0 to 8.2.0

13

lib/index.js

@@ -16,6 +16,17 @@ 'use strict'

var deprecationWarningIssued = false
// Factory to transform.
function factory(tree, options) {
var settings = options || {}
var dangerous = settings.allowDangerousHTML
// Issue a warning if the deprecated tag 'allowDangerousHTML' is used
if (settings.allowDangerousHTML !== undefined && !deprecationWarningIssued) {
deprecationWarningIssued = true
console.warn(
'mdast-util-to-hast: deprecation: `allowDangerousHTML` is nonstandard, use `allowDangerousHtml` instead'
)
}
var dangerous = settings.allowDangerousHtml || settings.allowDangerousHTML
var footnoteById = {}

@@ -22,0 +33,0 @@

10

package.json
{
"name": "mdast-util-to-hast",
"version": "8.1.0",
"version": "8.2.0",
"description": "mdast utility to transform to hast",

@@ -45,8 +45,8 @@ "license": "MIT",

"nyc": "^15.0.0",
"prettier": "^1.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"prettier": "^2.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"tape": "^4.0.0",
"tinyify": "^2.0.0",
"xo": "^0.27.0"
"xo": "^0.28.0"
},

@@ -53,0 +53,0 @@ "scripts": {

@@ -66,3 +66,3 @@ # mdast-util-to-hast

###### `options.allowDangerousHTML`
###### `options.allowDangerousHtml`

@@ -104,3 +104,3 @@ Whether to allow [`html`][mdast-html] nodes and inject them as raw HTML

[`remark-frontmatter`][remark-frontmatter])
* [`html`][mdast-html] nodes are ignored if `allowDangerousHTML` is `false`
* [`html`][mdast-html] nodes are ignored if `allowDangerousHtml` is `false`
* [`position`][position]s are properly patched

@@ -222,3 +222,3 @@ * [`node.data.hName`][hname] configures the hast element’s tag-name

Embedded hast properties (`hName`, `hProperties`, `hChildren`), custom handlers,
and the `allowDangerousHTML` option all provide openings.
and the `allowDangerousHtml` option all provide openings.

@@ -269,3 +269,3 @@ The following example shows how a script is injected where a benign code block

Passing `allowDangerousHTML: true` to `mdast-util-to-hast` is typically still
Passing `allowDangerousHtml: true` to `mdast-util-to-hast` is typically still
not enough to run unsafe code:

@@ -278,3 +278,3 @@

If `allowDangerousHTML: true` is also given to `hast-util-to-html` (or
If `allowDangerousHtml: true` is also given to `hast-util-to-html` (or
`rehype-stringify`), the unsafe code runs:

@@ -281,0 +281,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