Merge branch 'main' into env-file-fix
Browse files
app/commit.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{ "commit": "
|
|
|
1 |
+
{ "commit": "e064803955604198c6aac7b257efd0ad8503cb73", "version": "0.0.3" }
|
app/lib/hooks/useEditChatDescription.ts
CHANGED
@@ -92,7 +92,8 @@ export function useEditChatDescription({
|
|
92 |
}
|
93 |
|
94 |
const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100;
|
95 |
-
|
|
|
96 |
|
97 |
if (!lengthValid) {
|
98 |
toast.error('Description must be between 1 and 100 characters.');
|
@@ -100,7 +101,7 @@ export function useEditChatDescription({
|
|
100 |
}
|
101 |
|
102 |
if (!characterValid) {
|
103 |
-
toast.error('Description can only contain
|
104 |
return false;
|
105 |
}
|
106 |
|
|
|
92 |
}
|
93 |
|
94 |
const lengthValid = trimmedDesc.length > 0 && trimmedDesc.length <= 100;
|
95 |
+
// Allow letters, numbers, spaces, and common punctuation but exclude characters that could cause issues
|
96 |
+
const characterValid = /^[a-zA-Z0-9\s\-_.,!?()[\]{}'"]+$/.test(trimmedDesc);
|
97 |
|
98 |
if (!lengthValid) {
|
99 |
toast.error('Description must be between 1 and 100 characters.');
|
|
|
101 |
}
|
102 |
|
103 |
if (!characterValid) {
|
104 |
+
toast.error('Description can only contain letters, numbers, spaces, and basic punctuation.');
|
105 |
return false;
|
106 |
}
|
107 |
|