Registry / utility / microcosm-cc-bluemonday

microcosm-cc-bluemonday

JSON →
library1.0.27gogounverified

Package bluemonday provides a way of describing an allowlist of HTML elements and attributes as a policy, and for that policy to be applied to untrusted strings from users that may contain markup.

go get github.com/microcosm-cc/bluemonday
INSTALL
IMPORT
SIG · MICROCOSM-CC-BLUEM
M
microcosm-cc-bluemonday
utilitygov1.0.27
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bluemonday
github.com/microcosm-cc/bluemonday

Sanitize HTML input with strict policy

package main import ( "fmt" "github.com/microcosm-cc/bluemonday" ) func main() { p := bluemonday.StrictPolicy() cleaned := p.Sanitize("<script>alert('xss')</script>Hello") fmt.Println(cleaned) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.27latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
microcosm-cc-bluemonday — go get microcosm-cc-bluemonday · libregistry