mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
True-Name Nemesis crashes on "$" Player name (#7944)
This commit is contained in:
@@ -43,6 +43,7 @@ import forge.util.TextUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -273,7 +274,7 @@ public final class StaticAbilityContinuous {
|
||||
if (hostCard.hasChosenPlayer()) {
|
||||
Player cp = hostCard.getChosenPlayer();
|
||||
input = input.replaceAll("ChosenPlayerUID", String.valueOf(cp.getId()));
|
||||
input = input.replaceAll("ChosenPlayerName", cp.getName());
|
||||
input = input.replaceAll("ChosenPlayerName", Matcher.quoteReplacement(cp.getName()));
|
||||
}
|
||||
if (hostCard.hasNamedCard()) {
|
||||
final String chosenName = hostCard.getNamedCard().replace(",", ";");
|
||||
|
||||
Reference in New Issue
Block a user