File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ This works in a similar way to the [`parse5`][hast-util-from-parse5] version
73
73
except that it works directly from the DOM rather than a string of HTML.
74
74
Consequently, it does not maintain [ positional info] [ positional-information ] .
75
75
76
+ ## Security
77
+
78
+ Use of ` hast-util-from-dom ` can open you up to a
79
+ [ cross-site scripting (XSS)] [ xss ] attack if the DOM is unsafe.
80
+ Use [ ` hast-util-santize ` ] [ sanitize ] to make the hast tree safe.
81
+
76
82
## Related
77
83
78
84
* [ ` hast-util-from-parse5 ` ] [ hast-util-from-parse5 ]
@@ -147,3 +153,7 @@ abide by its terms.
147
153
[ hast ] : https://github.com/syntax-tree/hast
148
154
149
155
[ hast-util-from-parse5 ] : https://github.com/syntax-tree/hast-util-from-parse5
156
+
157
+ [ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
158
+
159
+ [ sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
You can’t perform that action at this time.
0 commit comments