Sign In Register

How can we help you today?

Start a new topic

Http URL escaping


is in Cloud Code some kind of functionality that allow to make url escaping? I mean to make from this " With Spaces" to "" and of course changing other unallowed signs in url?

Hi Marcin,

You can use encodeURIComponent & decodeURIComponent to do this in Cloud Code.

var url = " With Spaces"

var res = encodeURIComponent(url);
var res2 = decodeURIComponent(res);

Spark.setScriptData("encoded", res)
Spark.setScriptData("decoded", res2)

response scriptData should be this

"scriptData": {
  "decoded": " With Spaces",
  "encoded": ""


Hope that helps, if you have any further questions just let me know.



Great thank you for help:)


Login to post a comment