I use the WixLocation API to identify first and last names of the current user in a dynamic page [
let lastName = wixLocation.path[1];
let firstName = wixLocation.path[2];
]
and then proceed with some additional features. It works perfectly with one exception:
When the user has a double first or double last names (let’s suppose his first name is Jean Baptiste), then the wixLocation.path[1] gives jean-baptiste with a hyphen in the middle. And it then prevents all of my next additional features.
Is there any way I can remove this hyphen in between these two names?
Thanks for yoru reply.