Skip to content

Commit 8ddb1be

Browse files
author
Julien
committed
Merge remote-tracking branch 'origin/5841-sdk-a-text-cant-have-a-semi-colon-in-it'
2 parents 70f397c + eb15799 commit 8ddb1be

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

engine/modules/entities/src/main/java/com/codingame/gameengine/module/entities/Serializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static String formatFrameTime(double t) {
141141

142142
static String escape(String text) {
143143
String escaped = text.replaceAll("\\'", "\\\\'");
144-
if (escaped.contains(" ")) {
144+
if (escaped.contains(" ") || escaped.contains(";")) {
145145
return "'" + escaped + "'";
146146
}
147147
return escaped;

engine/modules/entities/src/main/resources/view/entity-module/properties.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function unescape (text) {
131131
// replace \' by '
132132
const unescaped = text.split("\\'").join("'")
133133

134-
if (unescaped.includes(' ')) {
134+
if (unescaped.includes(' ') || unescaped.includes(';')) {
135135
return unescaped.slice(1, unescaped.length - 1)
136136
} else {
137137
return unescaped

playground/misc/misc-3-release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The CodinGame SDK is regularly updated and improved. This document lets you know
77
### 🐞 Bug fix
88

99
- The `turn` argument of the Referee's `gameTurn()` now starts at 1 instead of 0
10+
- A Text can now have semicolons in it
1011
- Improved error handling
1112

1213
## 3.4.7

0 commit comments

Comments
 (0)