Each server has a list of strings computed to faster pick the server when connecting, aka keys. Change functions used to convert the string for keys to be in sync with what is used for user input.
Keep string.SnakeCase function in sync with string.Title to remove non-alphanumeric chars from the input.
For testing:
Lao People's Democratic Republic contains a ' in its name. It is displayed Lao_Peoples_Democratic_Republic and connect must work with the displayed name, but also with Lao_People\'s_Democratic_Republic so it is backward compatible.
Signed-off-by: Marius Sincovici marius.sincovici@nordsec.com
string.SnakeCase
function in sync withstring.Title
to remove non-alphanumeric chars from the input.For testing:
Lao People's Democratic Republic
contains a'
in its name. It is displayedLao_Peoples_Democratic_Republic
and connect must work with the displayed name, but also withLao_People\'s_Democratic_Republic
so it is backward compatible.