Documentation ¶
Overview ¶
Package sanitize provides functions for sanitizing text.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseName ¶
BaseName makes a string safe to use in a file name, producing a sanitized basename replacing . or / with -. No attempt is made to normalise a path or normalise case.
func HTML ¶
HTML strips html tags, replace common entities, and escapes <>&;'" in the result. Note the returned text may contain entities as it is escaped by HTMLEscapeString, and most entities are not translated.
func HTMLAllowing ¶
HTMLAllowing sanitizes html, allowing some tags. Arrays of allowed tags and allowed attributes may optionally be passed as the second and third arguments.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.