Add ImageName::as_escaped_path and corresponding ImageName::from_escaped_path.
In ImageName the reference may contains upper letters like SuperTag, but the filesystem of Windows and macOS does not distinguish the upper and lower letters. Thus the current implementations does not work correctly except for Linux if the reference contains upper letters.
These introduces new encoding based on URL encoding. An upper letter A is encoded into %41 while lower letters are kept as it is.
[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*(\/[a-z0-9]+((\.|_|__|-+)[a-z0-9]+)*)*
defined in https://github.com/opencontainers/distribution-spec/blob/v1.1.0/spec.mdImageName::as_escaped_path
and correspondingImageName::from_escaped_path
.ImageName
the reference may contains upper letters likeSuperTag
, but the filesystem of Windows and macOS does not distinguish the upper and lower letters. Thus the current implementations does not work correctly except for Linux if the reference contains upper letters.A
is encoded into%41
while lower letters are kept as it is.