Skip to content

Commit 8c49479

Browse files
committed
Add notes on security
1 parent 06566dd commit 8c49479

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ If an `svg` element is found in the HTML space, `toParse5` automatically
6161
switches to the SVG space when entering the element, and switches back when
6262
exiting.
6363

64+
## Security
65+
66+
Use of `hast-util-to-parse5` can open you up to a
67+
[cross-site scripting (XSS)][xss] attack if the hast tree is unsafe.
68+
6469
## Contribute
6570

6671
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get
@@ -120,3 +125,5 @@ abide by its terms.
120125
[tree]: https://github.com/syntax-tree/unist#tree
121126

122127
[hast]: https://github.com/syntax-tree/hast
128+
129+
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting

0 commit comments

Comments
 (0)