sParameter = encodeURIComponent(sParameter.trim()) //"Test%20-%20Text"
the .trim will remove leading and trailing whitespace from the string. encodeURIComponent will URL-encode it.
sParameter = encodeURIComponent(sParameter.trim()) //"Test%20-%20Text"
the .trim will remove leading and trailing whitespace from the string. encodeURIComponent will URL-encode it.