Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

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

Amruth Pillai1facd2ad111c
diff --git a/client/modals/dashboard/CreateResumeModal.tsx b/client/modals/dashboard/CreateResumeModal.tsx
index b77addfc9..ee3dbb53c 100644
--- a/client/modals/dashboard/CreateResumeModal.tsx
+++ b/client/modals/dashboard/CreateResumeModal.tsx
@@ -58,7 +58,7 @@ const CreateResumeModal: React.FC = () => {
const slug = name
? name
.toLowerCase()
- .replace(/[`~!@#$%^&*()_|+=?;:'",.<>{}[]\\\/]/gi, '')
+ .replace(/[^\w\s]/gi, '')
.replace(/[ ]/gi, '-')
: '';
diff --git a/client/modals/dashboard/RenameResumeModal.tsx b/client/modals/dashboard/RenameResumeModal.tsx
index 052c632a8..1d8f40d8f 100644
--- a/client/modals/dashboard/RenameResumeModal.tsx
+++ b/client/modals/dashboard/RenameResumeModal.tsx
@@ -56,7 +56,7 @@ const RenameResumeModal: React.FC = () => {
const slug = name
? name
.toLowerCase()
- .replace(/[`~!@#$%^&*()_|+=?;:'",.<>{}[]\\\/]/gi, '')
+ .replace(/[^\w\s]/gi, '')
.replace(/[ ]/gi, '-')
: '';