sanitize

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package sanitize contains a set of functions that sanitizes input received from external systems before being persisted in the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(s string) string

String sanitizes s by replacing all invalid unicode characters as well as the sentinel start character U+FFFE and sentinel end character U+FFFF with the Unicode replacement character U+FFFD.

According to the Unicode standard: "If a noncharacter is received in open interchange, an application is not required to interpret it in any way. It is good practice, however, to recognize it as a noncharacter and to take appropriate action, such as replacing it with U+FFFD replacement character." See https://www.unicode.org/versions/Unicode13.0.0/ch23.pdf#G12612.

Types

This section is empty.

Jump to

Keyboard shortcuts

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