Package sanitize provides functions for sanitizing text.
Accents replaces a set of accented characters with ascii equivalents.
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.
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.
HTMLAllowing sanitizes html, allowing some tags. Arrays of allowed tags and allowed attributes may optionally be passed as the second and third arguments.
Name makes a string safe to use in a file name by first finding the path basename, then replacing non-ascii characters.
Path makes a string safe to use as a URL path, removing accents and replacing separators with -. The path may still start at / and is not intended for use as a file system path without prefix.