From 98e3ecd76ea2c93956d29f946b1f9b4efe779c20 Mon Sep 17 00:00:00 2001 From: Klemek Date: Tue, 16 Jun 2026 11:28:43 +0200 Subject: [PATCH] fix: replace non valid chars with space --- src/lib/factory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/factory.ts b/src/lib/factory.ts index bcda41d..32e5bdb 100644 --- a/src/lib/factory.ts +++ b/src/lib/factory.ts @@ -21,10 +21,10 @@ export class DomainFactory { .map((word) => { word = word .normalize("NFD") - .replace(/[\u0300-\u036f]/g, "") .toLowerCase() + .replace(/[^a-z0-9-]/g, "") .trim(); - if (word.includes(" ") || word.length == 0) { + if (word.length == 0) { return null; } return word;