File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ The latest released version is [`3.0.0`][latest].
69
69
* [ Glossary] ( #glossary )
70
70
* [ List of Utilities] ( #list-of-utilities )
71
71
* [ References] ( #references )
72
+ * [ Security] ( #security )
72
73
* [ Contribute] ( #contribute )
73
74
* [ Acknowledgments] ( #acknowledgments )
74
75
* [ License] ( #license )
@@ -1387,6 +1388,15 @@ See the [unist list of utilities][utilities] for more utilities.
1387
1388
C. McCormack.
1388
1389
W3C.
1389
1390
1391
+ ## Security
1392
+
1393
+ As mdast can contain HTML and be used to represent HTML, and improper use of
1394
+ HTML can open you up to a [ cross-site scripting (XSS)] [ xss ] attack, improper use
1395
+ of mdast is also unsafe.
1396
+ When transforming to HTML (typically through [ ** hast** ] [ hast ] ), always be
1397
+ careful with user input and use [ ` hast-util-santize ` ] [ sanitize ] to make the hast
1398
+ tree safe.
1399
+
1390
1400
## Contribute
1391
1401
1392
1402
See [ ` contributing.md ` ] [ contributing ] in [ ` syntax-tree/.github ` ] [ health ] for
@@ -1580,3 +1590,9 @@ projects!
1580
1590
[ unified ] : https://github.com/unifiedjs/unified
1581
1591
1582
1592
[ remark ] : https://github.com/remarkjs/remark
1593
+
1594
+ [ xss ] : https://en.wikipedia.org/wiki/Cross-site_scripting
1595
+
1596
+ [ hast ] : https://github.com/syntax-tree/hast
1597
+
1598
+ [ sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
You can’t perform that action at this time.
0 commit comments