the job display name should be the unmangled name (unless the user has customized, but you cannot customize display name for multibranch)
We can expose the display name as an environment variable too
The Job name cannot stay as is currently.
% is not a valid character on some file systems.
.. is a valid branch name on some source control systems.
Even seemingly "safe" filenames like aux can cause issues for users.
There is a very limited set of characters that are safe for filesystems: A-Za-z0-9_.- is all there is to play with
Furthermore, the name length causes lots of issues. So we need to ensure that the branch name is not "too long"
The only way out of that with minimal risk of collisions is a deterministic hashing algorithm... which becomes ugly... or part name part hash with some characters used to disambiguate to prevent the smaller hash from causing issues.
The current algorithm was chosen to reduce the risk of collision to less than 1 in 33 million, which is about as low as we can go before things get ugly.
If somebody else has a wonderful magical scheme for mapping names from the entire unicode space in a predictable pattern into the character set A-Za-z0-9_.- that also makes care to ensure silly branch names like .. are not given the name .. and dangerous branch names like AUX, CON, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, PRN, NULL or their lower case equivalents are mapped into something sensible, and doesn't have risk of collisions (e.g. when
JENKINS-36240 gets merged and then we can potentially start building "trusted" fork branches such that the branch name is now controlled by the fork)... oh and can we not actually change the job name from the branch name... and can we keep the job names to something short... well I'm all ears... but I think you will find it an impossible and thankless task.
What we need to do is expose the human readable bits correctly and ensure that plugins do correct things rather than blinding assuming things.
We probably also need to apply name mangling in core to all jobs... but that is a different story.
Blue Ocean could use getItemByBranch() to resolve branches if blue ocean wants to handle the case of branch names like .. other than that, jenkins core will still resolve the old urls