Skip to content

Commit c2b2e73

Browse files
Merge pull request #7286 from deutschebank/db-contrib/waltz-7281_actors_with_characters_&_display_issue_in_multiple_pages
Db contrib/waltz 7281 actors with characters & display issue in multiple pages
2 parents 0e0edda + 21d002f commit c2b2e73

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

waltz-common/src/main/java/org/finos/waltz/common/StringUtilities.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ public static String sanitizeCharacters(String str) {
256256
.replaceAll("“", "\"")
257257
.replaceAll("”", "\"")
258258
.replaceAll("’", "'")
259-
.replaceAll(" ", " ");
259+
.replaceAll(" ", " ")
260+
.replaceAll("&", "&");
260261
}
261262
}
262263

waltz-data/src/main/java/org/finos/waltz/data/actor/ActorDao.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import static org.finos.waltz.common.Checks.checkNotNull;
4646
import static org.finos.waltz.common.Checks.checkOptionalIsPresent;
4747
import static org.finos.waltz.common.DateTimeUtilities.toLocalDateTime;
48+
import static org.finos.waltz.common.StringUtilities.sanitizeCharacters;
4849

4950
@Repository
5051
public class ActorDao {
@@ -56,8 +57,8 @@ public class ActorDao {
5657

5758
return ImmutableActor.builder()
5859
.id(record.getId())
59-
.name(record.getName())
60-
.description(record.getDescription())
60+
.name(sanitizeCharacters(record.getName()))
61+
.description(sanitizeCharacters(record.getDescription()))
6162
.lastUpdatedAt(toLocalDateTime(record.getLastUpdatedAt()))
6263
.lastUpdatedBy(record.getLastUpdatedBy())
6364
.isExternal(record.getIsExternal())

waltz-data/src/main/java/org/finos/waltz/data/logical_flow/LogicalFlowDao.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
import static org.finos.waltz.schema.tables.Application.APPLICATION;
7676
import static org.finos.waltz.schema.tables.LogicalFlow.LOGICAL_FLOW;
7777
import static org.jooq.lambda.tuple.Tuple.tuple;
78-
78+
import static org.finos.waltz.common.StringUtilities.sanitizeCharacters;
7979

8080
@Repository
8181
public class LogicalFlowDao {
@@ -113,13 +113,13 @@ public class LogicalFlowDao {
113113
.source(ImmutableEntityReference.builder()
114114
.kind(EntityKind.valueOf(record.getSourceEntityKind()))
115115
.id(record.getSourceEntityId())
116-
.name(ofNullable(r.getValue(SOURCE_NAME_FIELD)))
116+
.name(ofNullable(sanitizeCharacters(r.getValue(SOURCE_NAME_FIELD))))
117117
.externalId(ofNullable(r.getValue(SOURCE_EXTERNAL_ID_FIELD)))
118118
.build())
119119
.target(ImmutableEntityReference.builder()
120120
.kind(EntityKind.valueOf(record.getTargetEntityKind()))
121121
.id(record.getTargetEntityId())
122-
.name(ofNullable(r.getValue(TARGET_NAME_FIELD)))
122+
.name(ofNullable(sanitizeCharacters(r.getValue(TARGET_NAME_FIELD))))
123123
.externalId(ofNullable(r.getValue(TARGET_EXTERNAL_ID_FIELD)))
124124
.build())
125125
.entityLifecycleStatus(readEnum(record.getEntityLifecycleStatus(), EntityLifecycleStatus.class, s -> EntityLifecycleStatus.ACTIVE))

0 commit comments

Comments
 (0)