Registry / utility / google-safehtml

google-safehtml

JSON →
library0.1.0gogounverified

Package safehtml provides immutable string-like types which represent values that are guaranteed to be safe to use in various HTML contexts.

go get github.com/google/safehtml
INSTALL
IMPORT
SIG · GOOGLE-SAFEHTML
G
google-safehtml
utilitygov0.1.0
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.

safehtml
github.com/google/safehtml

Escape a string for safe HTML usage

package main import ( "fmt" "github.com/google/safehtml" ) func main() { s := safehtml.HTMLEscaped("<script>alert('xss')</script>") fmt.Println(s.String()) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
google-safehtml — go get google-safehtml · libregistry