Ming
0
Q:

js url encode


 var uri = "my test.asp?name=ståle&car=saab";
var res = encodeURI(uri); 
1
var urlVar = encodeURI("This text can be passed on a url now");
3
var encodeURI = encodeURIComponent("&")
1
The encodeURIComponent() function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.
console.log(encodeURIComponent('?x=test'));
// expected output: "%3Fx%3Dtest"
1
# -r enable raw output

jq -r .[0].string FILE.json
1

New to Communities?

Join the community