File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -566,6 +566,13 @@ The rest is sorted alphabetically based on content after `hast-util-`
566
566
C. McCormack.
567
567
W3C.
568
568
569
+ ## Security
570
+
571
+ As hast represents HTML, and improper use of HTML can open you up to a
572
+ [ cross-site scripting (XSS)] [ xss ] attack, improper use of hast is also unsafe.
573
+ Always be careful with user input and use [ ` hast-util-santize ` ] [ sanitize ] to
574
+ make the hast tree safe.
575
+
569
576
## Contribute
570
577
571
578
See [ ` contributing.md ` ] [ contributing ] in [ ` syntax-tree/.github ` ] [ health ] for
@@ -681,6 +688,10 @@ for contributing to hast and related projects!
681
688
682
689
[ concept-aria-reflection ] : https://w3c.github.io/aria/#idl_attr_disambiguation
683
690
691
+ [ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
692
+
693
+ [ sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
694
+
684
695
[ term-tree ] : https://github.com/syntax-tree/unist#tree
685
696
686
697
[ term-child ] : https://github.com/syntax-tree/unist#child
You can’t perform that action at this time.
0 commit comments