I use the WixLocation API to identify first and last names of the current user in a dynamic page [
let lastName = wixLocation.path;
let firstName = wixLocation.path;
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 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.