Skip to content

Commit 7b61a59

Browse files
authored
Add notes on security
1 parent 76cb1ae commit 7b61a59

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
@@ -86,6 +86,11 @@ Utility to get the plain-text value of a [*node*][node].
8686
* Replaced [*elements*][element] (such as `audio`) are treated like
8787
non-replaced *elements*
8888

89+
## Security
90+
91+
`hast-util-to-text` does not change the syntax tree so there are no
92+
openings for [cross-site scripting (XSS)][xss] attacks.
93+
8994
## Related
9095

9196
* [`hast-util-to-string`](https://github.com/rehypejs/rehype-minify/tree/master/packages/hast-util-to-string)
@@ -168,3 +173,5 @@ abide by its terms.
168173
[text]: https://github.com/syntax-tree/hast#text
169174

170175
[element]: https://github.com/syntax-tree/hast#element
176+
177+
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting

0 commit comments

Comments
 (0)