From 2d57bd27461c5d63d454f93fb17b001dfdf28211 Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Mon, 16 Dec 2024 18:55:38 -0500 Subject: [PATCH 1/2] add: charactors to the vaild list for chat titles added common punctuation to the charactersValid --- app/lib/hooks/useEditChatDescription.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/hooks/useEditChatDescription.ts b/app/lib/hooks/useEditChatDescription.ts index da07f2c..5230d6c 100644 --- a/app/lib/hooks/useEditChatDescription.ts +++ b/app/lib/hooks/useEditChatDescription.ts @@ -92,7 +92,8 @@ export function useEditChatDescription({ } const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100; - const characterValid = /^[a-zA-Z0-9\s]+$/.test(trimmedDesc); + // Allow letters, numbers, spaces, and common punctuation but exclude characters that could cause issues + const characterValid = /^[a-zA-Z0-9\s\-_.,!?()[\]{}'"]+$/.test(trimmedDesc); if (!lengthValid) { toast.error('Description must be between 1 and 100 characters.'); @@ -100,7 +101,7 @@ export function useEditChatDescription({ } if (!characterValid) { - toast.error('Description can only contain alphanumeric characters and spaces.'); + toast.error('Description can only contain letters, numbers, spaces, and basic punctuation.'); return false; } From 6003c165ef9347d5a9f97ea711f84d37d65b5c0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Dec 2024 22:12:17 +0000 Subject: [PATCH 2/2] chore: update commit hash to e064803955604198c6aac7b257efd0ad8503cb73 --- app/commit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/commit.json b/app/commit.json index b9c669a..7ff7537 100644 --- a/app/commit.json +++ b/app/commit.json @@ -1 +1 @@ -{ "commit": "eb6d4353565be31c6e20bfca2c5aea29e4f45b6d", "version": "0.0.3" } +{ "commit": "e064803955604198c6aac7b257efd0ad8503cb73", "version": "0.0.3" }