Skip to content

Commit

Permalink
fix: simplify regex and allow more punctuation (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalstruck authored Jan 24, 2025
1 parent 4926d99 commit 9f87170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/lib/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const entityIdSchema = yup
* https://www.regular-expressions.info/unicode.html
*/
export const allowedCommonCharactersRegex =
/^[\u3000-\u303F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\p{Letter}\p{Mark}\s0-9.,¡!¿?:'"()\-;/+&$%]*$/u;
/^[\u3000-\u303F\u4E00-\u9FFF\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\p{Letter}\p{Mark}\p{Punctuation}\s0-9+$]*[^{\\}]$/u;

/** use for titles */
export const allowedTitleCharactersRegex =
Expand Down

0 comments on commit 9f87170

Please sign in to comment.