From 87d998dad0a28d8c06b8cb655c80a377da2d3c5f Mon Sep 17 00:00:00 2001 From: KeenShayne Date: Sat, 21 Aug 2021 00:59:08 -0400 Subject: [PATCH] Sanitizes input Follows similar procedure to setting custom race name in the character setup panel. --- code/modules/tgui/modules/appearance_changer.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 369cd9f2290..b125338b306 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -92,7 +92,8 @@ if(can_change(APPEARANCE_RACE) && (params["race"] in valid_species)) if(target.change_species(params["race"])) if(params["race"] == "Custom Species") - target.custom_species = input(usr,"Custom Species name:","Species Name") + target.custom_species = sanitize(input(usr, "Input custom species name:", + "Custom Species Name") as null|text, MAX_NAME_LEN) cut_data() generate_data(usr) changed_hook(APPEARANCECHANGER_CHANGED_RACE)