Documentation
¶
Overview ¶
Package html provides XSS prevention (CWE-79) using pure Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EscapeString ¶
EscapeString escapes HTML special characters.
Types ¶
type Sanitizer ¶
type Sanitizer struct {
// contains filtered or unexported fields
}
Sanitizer provides HTML sanitization.
func (*Sanitizer) AllowedTags ¶
AllowedTags returns the list of allowed tags.
func (*Sanitizer) IsStripAll ¶
IsStripAll returns whether all tags are stripped.
func (*Sanitizer) SanitizeAttribute ¶
SanitizeAttribute escapes HTML attribute values.
func (*Sanitizer) SanitizeBody ¶
SanitizeBody removes dangerous HTML elements.
Click to show internal directories.
Click to hide internal directories.