Skip to content

Commit

Permalink
fix: sanitize user names (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
matmut7 authored Dec 20, 2023
1 parent 9329518 commit 39a6d7f
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 39a6d7f

Please sign in to comment.