Allow for URI-unsafe player names
Some plugins allow for a player name prefix. If this contains a username-unsafe character like %, it can break player face rendering on the map.
This commit is contained in:
parent
3ff0d632a2
commit
ebd056d920
1 changed files with 3 additions and 3 deletions
|
|
@ -8,9 +8,9 @@ function createMinecraftHead(player,size,completed,failed) {
|
||||||
};
|
};
|
||||||
var faceimg;
|
var faceimg;
|
||||||
if(size == 'body')
|
if(size == 'body')
|
||||||
faceimg = 'faces/body/' + player + '.png';
|
faceimg = 'faces/body/' + encodeURIComponent(player) + '.png';
|
||||||
else
|
else
|
||||||
faceimg = 'faces/' + size + 'x' + size + '/' + player + '.png';
|
faceimg = 'faces/' + size + 'x' + size + '/' + encodeURIComponent(player) + '.png';
|
||||||
|
|
||||||
faceImage.src = concatURL(dynmap.options.url.markers, faceimg);
|
faceImage.src = concatURL(dynmap.options.url.markers, faceimg);
|
||||||
}
|
}
|
||||||
|
|
@ -57,4 +57,4 @@ function chat_encoder(message) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return message.text;
|
return message.text;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue