So, if I use the file picker to choose a logo for a team with one of the special characters here in Norway.
ÆØÅ for example, or just a whitespace. It's referred as %20% (or other codes for special characters).
Is there a way to set the Dashboard to accept UTF8 characters in parameters like this?
So far I've solve it with the following:
var logo = params.getValue('teamInfo_editLogo', 0);
if (
logo.indexOf('\%C3\%A6') > -1 ||
logo.indexOf('\%C3\%86') > -1 ||
logo.indexOf('\%C3\%B8') > -1 ||
logo.indexOf('\%C3\%98') > -1 ||
logo.indexOf('\%C3\%A5') > -1 ||
logo.indexOf('\%C3\%85') > -1 ||
logo.indexOf('\%20') > -1
)
{
logo = logo.replace('\%C3\%A6','æ');
logo = logo.replace('\%C3\%86','Æ');
logo = logo.replace('\%C3\%B8','ø');
logo = logo.replace('\%C3\%98','Ø');
logo = logo.replace('\%C3\%A5','å');
logo = logo.replace('\%C3\%85','Å');
logo = logo.replace('\%20',' ');
params.setValue('teamInfo_editLogo', 0, logo);
}
I just kinda hope there's a more elegant sollution out there.