Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit d0c068a

Browse files
committed
Add notes on security
1 parent d227372 commit d0c068a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

readme.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,16 @@ time.
130130
* [`virtual-dom/h`][vdom]
131131
* [`hyperscript`][hyperscript]
132132

133+
## Security
134+
135+
Use of `hast-to-hyperscript` can open you up to a
136+
[cross-site scripting (XSS)][xss] attack if the hast tree is unsafe.
137+
Use [`hast-util-santize`][sanitize] to make the hast tree safe.
138+
133139
## Related
134140

135-
* [`hastscript`][hastscript]
141+
* [`hastscript`][hastscript] — Hyperscript compatible DSL for creating nodes
142+
* [`hast-util-sanitize`][sanitize] — Sanitise nodes
136143

137144
## Contribute
138145

@@ -221,3 +228,7 @@ abide by its terms.
221228
[element]: https://github.com/syntax-tree/hast#element
222229

223230
[h]: #function-hname-attrs-children
231+
232+
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
233+
234+
[sanitize]: https://github.com/syntax-tree/hast-util-sanitize

0 commit comments

Comments
 (0)