Skip to content

Commit 1dae00c

Browse files
committed
add documentation for UnsafeContent
1 parent d7339af commit 1dae00c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,13 @@ Attr{
8383
"onClick": "javascriptFunc()",
8484
}
8585
```
86+
87+
#### func `UnsafeContent`
88+
89+
This will bypass HTML sanitization and allow for direct injecting
90+
```golang
91+
92+
injection := "<script>alert('xss')</script>"
93+
root := H("div", UnsafeContent(injection))
94+
// <script>alert('xss')</script>
95+
```

0 commit comments

Comments
 (0)