sanitize

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package sanitize provides funcs that will allow untrusted content into a template and controls the escaping.

Index

Constants

This section is empty.

Variables

View Source
var ASCIISpace = rune(` `[0])

ASCIISpace ...

Functions

func Sanitize

func Sanitize(s string) string

SanitiseHTML sanitizes HTML Leaving a safe set of HTML intact that is not going to pose an XSS risk

func StripTags

func StripTags(s string) string

StripTags allows everything, allows tabs, newlines, ASCII space but non-conforming whitespace, control chars, and also prevents shouting

func StripTagsSentence

func StripTagsSentence(s string) string

StripTagsSentence strips all HTML tags, allows ASCII space

Types

This section is empty.

Jump to

Keyboard shortcuts

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