From 1eca9449a0f3f661cb218a26e49a89612fcbe2b9 Mon Sep 17 00:00:00 2001 From: phyzical Date: Fri, 1 Apr 2022 20:58:36 +0800 Subject: [PATCH] removes spaces in at start and end of product name on creation closes #3007 --- src/Corporation/Actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Corporation/Actions.ts b/src/Corporation/Actions.ts index d5162bd54..8855e0478 100644 --- a/src/Corporation/Actions.ts +++ b/src/Corporation/Actions.ts @@ -419,7 +419,7 @@ export function MakeProduct( } const product = new Product({ - name: productName.replace(/[<>]/g, ""), //Sanitize for HTMl elements + name: productName.replace(/[<>]/g, "").trim(), //Sanitize for HTMl elements createCity: city, designCost: designInvest, advCost: marketingInvest,