Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Add notes on security
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jul 23, 2019
1 parent 6bfb842 commit 179c5b1
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ By default, the following is used:
Extra properties to set on the link (`Object?`).
Defaults to `{ariaHidden: true}` when in `'prepend'` or `'append'` mode.

## 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

See [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways
Expand All @@ -118,10 +126,6 @@ abide by its terms.

<!-- Definitions -->

[MIT][license] © [Ben Briggs][author]

<!-- Definitions -->

[build-badge]: https://img.shields.io/travis/remarkjs/remark-autolink-headings/master.svg

[build]: https://travis-ci.org/remarkjs/remark-autolink-headings
Expand Down Expand Up @@ -171,3 +175,7 @@ abide by its terms.
[rehype-autolink-headings]: https://github.com/rehypejs/rehype-autolink-headings

[hast]: https://github.com/syntax-tree/hast

[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting

[sanitize]: https://github.com/rehypejs/rehype-sanitize

0 comments on commit 179c5b1

Please sign in to comment.