remark-autolink-headings
Advanced tools
Comparing version 5.2.1 to 5.2.2
@@ -14,4 +14,6 @@ "use strict"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -41,3 +43,3 @@ | ||
content | ||
} = _objectSpread({}, defaults, opts); | ||
} = _objectSpread({}, defaults, {}, opts); | ||
@@ -50,3 +52,3 @@ let method; | ||
deprecationWarningIssued = true; | ||
console.warn('Deprecation Warning: `behaviour` is a nonstandard option. Use `behavior` instead.'); | ||
console.warn('[remark-autolink-headings] Deprecation Warning: `behaviour` is a nonstandard option. Use `behavior` instead.'); | ||
} | ||
@@ -53,0 +55,0 @@ |
{ | ||
"name": "remark-autolink-headings", | ||
"version": "5.2.1", | ||
"version": "5.2.2", | ||
"description": "remark plugin to automatically add links to headings", | ||
@@ -43,6 +43,6 @@ "license": "MIT", | ||
"prettier": "^1.0.0", | ||
"remark": "^10.0.0", | ||
"remark-cli": "^6.0.0", | ||
"remark-html": "^9.0.0", | ||
"remark-preset-wooorm": "^5.0.0", | ||
"remark": "^11.0.0", | ||
"remark-cli": "^7.0.0", | ||
"remark-html": "^10.0.0", | ||
"remark-preset-wooorm": "^6.0.0", | ||
"remark-slug": "^5.0.0", | ||
@@ -49,0 +49,0 @@ "tinyify": "^2.0.0", |
@@ -105,2 +105,10 @@ # remark-autolink-headings | ||
## Security | ||
Use of `remark-autolink-headings` can open you up to a | ||
[cross-site scripting (XSS)][xss] attack if you pass user provided content in | ||
`linkProperties` or `content`. | ||
Always be wary of user input and use [`rehype-sanitize`][sanitize]. | ||
## Contribute | ||
@@ -122,6 +130,2 @@ | ||
[MIT][license] © [Ben Briggs][author] | ||
<!-- Definitions --> | ||
[build-badge]: https://img.shields.io/travis/remarkjs/remark-autolink-headings/master.svg | ||
@@ -176,1 +180,5 @@ | ||
[hast]: https://github.com/syntax-tree/hast | ||
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting | ||
[sanitize]: https://github.com/rehypejs/rehype-sanitize |
@@ -26,3 +26,3 @@ import visit from 'unist-util-visit' | ||
console.warn( | ||
'Deprecation Warning: `behaviour` is a nonstandard option. Use `behavior` instead.' | ||
'[remark-autolink-headings] Deprecation Warning: `behaviour` is a nonstandard option. Use `behavior` instead.' | ||
) | ||
@@ -29,0 +29,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
13948
156
182