google / Safehtml
Licence: bsd-3-clause
Safe HTML for Go
Stars: ✭ 254
Programming Languages
go
31211 projects - #10 most used programming language
Safe HTML for Go
safehtml
provides immutable string-like types that wrap web types such as
HTML, JavaScript and CSS. These wrappers are safe by construction against XSS
and similar web vulnerabilities, and they can only be interpolated in safe ways.
You can read more about our approach to web security in our
whitepaper,
or this OWASP talk.
Additional subpackages provide APIs for managing exceptions to the
safety rules, and a template engine with a syntax and interface that closely
matches html/template
. You can refer
to the godoc
for each (sub)package for the API documentation and code examples.
More end-to-end demos are available in example_test.go
.
This is not an officially supported Google product.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].