fix(client/create-rename-slug): fix slug accepting apostrophes and other special characters

fix #706
This commit is contained in:
Amruth Pillai 2022-03-18 09:37:09 +01:00
parent 0e1e2bbe4e
commit 1facd2ad11
No known key found for this signature in database
GPG Key ID: E3C57DF9B80855AD
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ const CreateResumeModal: React.FC = () => {
const slug = name
? name
.toLowerCase()
.replace(/[`~!@#$%^&*()_|+=?;:'",.<>{}[]\\\/]/gi, '')
.replace(/[^\w\s]/gi, '')
.replace(/[ ]/gi, '-')
: '';

View File

@ -56,7 +56,7 @@ const RenameResumeModal: React.FC = () => {
const slug = name
? name
.toLowerCase()
.replace(/[`~!@#$%^&*()_|+=?;:'",.<>{}[]\\\/]/gi, '')
.replace(/[^\w\s]/gi, '')
.replace(/[ ]/gi, '-')
: '';