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 ¶
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.