Skip to content

Commit

Permalink
fix: sanitize user names
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 committed Dec 20, 2023
1 parent 9329518 commit 9a83851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/sluggify-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const sluggifyString = (input: string) =>
.normalize("NFKD") // break down characters and diacritics
.replace(/\p{Diacritic}/gu, "") // remove diacritics
.replace(/\s+/g, "-") // remove whitespaces
.replace(/'+/g, "")
.replace(/[^a-zA-Z-]/g, "") // remove everything else
.toLowerCase()

export default sluggifyString

0 comments on commit 9a83851

Please sign in to comment.