I have a problem with decode URL. Instead my URL always return space ' '. I want to prevent it and return ( sign plus ) if exist.
CodePudding user response:
Because plus is not use in params... params change the plus in space
CodePudding user response:
let assume the params is www.somewebsite.com?name=+somename
const params = new URLSearchParams(props.location.search);
console.log(params);
the console log look like this somename