Documentation
¶
Overview ¶
Package filename owns display-name normalization shared by HTTP file transport. A display filename is never a filesystem path or a storage object key.
Index ¶
Constants ¶
const MaxBytes = 255
Variables ¶
This section is empty.
Functions ¶
func Normalize ¶
Normalize removes path components, controls, invisible format/bidi marks and surrounding quotes. Long names retain a short safe extension and remain bounded valid UTF-8. Results own their bytes instead of retaining a larger incoming MIME header.
func StripInvisible ¶
StripInvisible removes zero-width and bidirectional formatting characters (U+200B–U+200F, U+202A–U+202E, U+2060–U+2064, U+2066–U+2069, U+061C and U+FEFF). They can hide or visually reorder a displayed name, for example making "invoice\u202Efdp.exe" render as "invoiceexe.pdf".
Types ¶
This section is empty.