allow ' in character names (#28652)

This commit is contained in:
Whisper
2024-06-08 06:37:55 -04:00
committed by GitHub
parent db6548bc99
commit 123dfee3a3

View File

@@ -25,7 +25,7 @@ namespace Content.Shared.Preferences
[Serializable, NetSerializable]
public sealed partial class HumanoidCharacterProfile : ICharacterProfile
{
private static readonly Regex RestrictedNameRegex = new("[^A-Z,a-z,0-9, -]");
private static readonly Regex RestrictedNameRegex = new("[^A-Z,a-z,0-9, ,\\-,']");
private static readonly Regex ICNameCaseRegex = new(@"^(?<word>\w)|\b(?<word>\w)(?=\w*$)");
public const int MaxNameLength = 32;