sanitize

package
Version: v0.0.0-...-0a117fc Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 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.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL