sanitizer

package
v0.0.0-...-642d756 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package sanitizer provides a simple html sanitizer to remove tags and attributes that could potentially cause security issues.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SanitizeBytes

func SanitizeBytes(b []byte) []byte

SanitizeBytes returns a sanitized version of the input. It throws out any attributes or tags that are not explicitly allowed in allowElems or allowAttributes below, including any child nodes of elements that are not allowed. It returns the empty string if there was an error parsing the input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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