Rejects names Polygon returns that are not a plain file name, so a hostile
or corrupted name such as ../../x cannot make us write outside the
problem directory.
Parameters
name: string
A file or language name received from Polygon
Returns string
The same name
Throws
When the name contains a path separator or a control
character, or is ./../empty
Rejects names Polygon returns that are not a plain file name, so a hostile or corrupted name such as
../../xcannot make us write outside the problem directory.