From e8dda272330118c79aaf03d3155431e2ad399e6e Mon Sep 17 00:00:00 2001 From: Nathanael Liu Date: Sat, 13 Apr 2024 13:41:31 +0000 Subject: [PATCH] feat: update allowed separator list (#173) --- apps/masterbots.ai/lib/url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/masterbots.ai/lib/url.ts b/apps/masterbots.ai/lib/url.ts index d6ef9ba2..3b5a88bf 100644 --- a/apps/masterbots.ai/lib/url.ts +++ b/apps/masterbots.ai/lib/url.ts @@ -11,7 +11,7 @@ export const toSlug = (username: string, separator = "_"): string => { .toLowerCase() .replace(/&/g, '_') .replace(/ & /g, '_') - .replace(/[^a-z0-9_]/g, separator) + .replace(/[^a-z0-9_+-]/g, separator) } // Function to simulate converting a slug back to a username