File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,14 @@ specify one.
58
58
59
59
[ ` Element ` ] [ element ] .
60
60
61
+ ## Security
62
+
63
+ Improper use of the ` selector ` or ` defaultTagName ` can open you up to a
64
+ [ cross-site scripting (XSS)] [ xss ] attack as the value of ` tagName ` , when
65
+ resolving to ` script ` , injects a ` script ` element into the syntax tree.
66
+
67
+ Do not use user input in ` selector ` or use [ ` hast-util-santize ` ] [ sanitize ] .
68
+
61
69
## Contribute
62
70
63
71
See [ ` contributing.md ` in ` syntax-tree/.github ` ] [ contributing ] for ways to get
@@ -117,3 +125,7 @@ abide by its terms.
117
125
[ node ] : https://github.com/syntax-tree/hast#nodes
118
126
119
127
[ element ] : https://github.com/syntax-tree/hast#element
128
+
129
+ [ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
130
+
131
+ [ sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
You can’t perform that action at this time.
0 commit comments