sanitizer

package
v0.0.0-...-aa867a8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sanitizer

type Sanitizer struct {
	*bluemonday.Policy
}

func InitSanitizer

func InitSanitizer() *Sanitizer

InitSanitizer sets up and returns a bluemonday policy.

func (*Sanitizer) Sanitize

func (s *Sanitizer) Sanitize(str string) (sanitizedStr string, ok bool)

Sanitize will parse and clean up the HTML of the input string, then sanitize allowed tags. TODO consider passing err back out of this instead of just ok

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL