diff --git a/src/gui/LeaderboardsGui.hx b/src/gui/LeaderboardsGui.hx
index 56b63878..1d9d457c 100644
--- a/src/gui/LeaderboardsGui.hx
+++ b/src/gui/LeaderboardsGui.hx
@@ -195,7 +195,7 @@ class LeaderboardsGui extends GuiImage {
for (score in scoreList) {
var scoreText = '${i}.
- ${score.name}
+ ${StringTools.htmlEscape(score.name)}
${score.rewind > 0 ? "
" : ""}
${isHuntScore ? Std.string(1000 - score.score) : Util.formatTime(score.score)}
${score.rating}
@@ -203,7 +203,7 @@ class LeaderboardsGui extends GuiImage {
if (levelSelectDifficulty == "customs") {
scoreText = '${i}.
- ${score.name}
+ ${StringTools.htmlEscape(score.name)}
${score.rewind > 0 ? "
" : ""}
${isHuntScore ? Std.string(1000 - score.score) : Util.formatTime(score.score)}
';
@@ -232,7 +232,7 @@ class LeaderboardsGui extends GuiImage {
for (score in scoreList) {
var scoreText = '${i}.
- ${score.name}
+ ${StringTools.htmlEscape(score.name)}
${score.rating}';
scoreTexts.push(scoreText);
i++;
diff --git a/src/gui/MPServerListGui.hx b/src/gui/MPServerListGui.hx
index f29f12db..50d2bf4e 100644
--- a/src/gui/MPServerListGui.hx
+++ b/src/gui/MPServerListGui.hx
@@ -97,7 +97,7 @@ class MPServerListGui extends GuiImage {
function updateServerListDisplay() {
serverDisplays = ourServerList.map(x -> return
- '
${x.players}/${x.maxPlayers} ${x.name}');
+ '
${x.players}/${x.maxPlayers} ${StringTools.htmlEscape(x.name)}');
serverList.setTexts(serverDisplays);
}
diff --git a/src/gui/MultiplayerLevelSelectGui.hx b/src/gui/MultiplayerLevelSelectGui.hx
index 77cb5b66..11f1883a 100644
--- a/src/gui/MultiplayerLevelSelectGui.hx
+++ b/src/gui/MultiplayerLevelSelectGui.hx
@@ -212,7 +212,8 @@ class MultiplayerLevelSelectGui extends GuiImage {
innerCtrl.addChild(chatWnd);
playerList = new GuiMLTextListCtrl(arial14, playerListArr.map(player -> {
- return '
${player.name}';
+ return
+ '
${StringTools.htmlEscape(player.name)}';
}), imgLoader);
playerList.selectedColor = 0xF29515;
playerList.selectedFillColor = 0xEBEBEB;
@@ -504,7 +505,8 @@ class MultiplayerLevelSelectGui extends GuiImage {
if (!showingCustoms)
playerList.setTexts(playerListArr.map(player -> {
- return '
${player.name}';
+ return
+ '
${StringTools.htmlEscape(player.name)}';
}));
var pubCount = 1; // Self
diff --git a/src/gui/PlayGui.hx b/src/gui/PlayGui.hx
index 00aab49c..a595d406 100644
--- a/src/gui/PlayGui.hx
+++ b/src/gui/PlayGui.hx
@@ -728,9 +728,9 @@ class PlayGui {
var plShadowScores = [];
playerList.sort((a, b) -> a.score > b.score ? -1 : (a.score < b.score ? 1 : 0));
for (item in playerList) {
- pl.push('
${Util.rightPad(item.name, 25, 3)}');
+ pl.push('
${Util.rightPad(StringTools.htmlEscape(item.name), 25, 3)}');
plScores.push('${item.score}');
- plShadow.push('
${Util.rightPad(item.name, 25, 3)}');
+ plShadow.push('
${Util.rightPad(StringTools.htmlEscape(item.name), 25, 3)}');
plShadowScores.push('${item.score}');
}
playerListCtrl.setTexts(pl);
@@ -746,9 +746,9 @@ class PlayGui {
if (p2 == null) {
var onePt = p1.score == 1;
if (onePt)
- MarbleGame.instance.world.displayAlert('${p1.name} won with 1 point!');
+ MarbleGame.instance.world.displayAlert('${StringTools.htmlEscape(p1.name)} won with 1 point!');
else
- MarbleGame.instance.world.displayAlert('${p1.name} won with ${p1.score} points!');
+ MarbleGame.instance.world.displayAlert('${StringTools.htmlEscape(p1.name)} won with ${p1.score} points!');
} else {
var tie = p1.score == p2.score;
if (tie) {
@@ -756,9 +756,9 @@ class PlayGui {
} else {
var onePt = p1.score == 1;
if (onePt)
- MarbleGame.instance.world.displayAlert('${p1.name} won with 1 point!');
+ MarbleGame.instance.world.displayAlert('${StringTools.htmlEscape(p1.name)} won with 1 point!');
else
- MarbleGame.instance.world.displayAlert('${p1.name} won with ${p1.score} points!');
+ MarbleGame.instance.world.displayAlert('${StringTools.htmlEscape(p1.name)} won with ${p1.score} points!');
if (p1.id == Net.clientId) { // This us
AchievementsGui.queueMPAchievement(512);