How can I decode an URL?

upasanamahanta
Mega Contributor

How can I decode an URL?

3 REPLIES 3

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

Can you provide an example so we can understand what the exact requirement is?



Regards,


Chuck Tomasi
Tera Patron

Hi Upasana,



I believe this is a duplicate post. If not, apologies. Go to https://developer.service-now.com, click Developers and use the search box to look for GlideURI



You will find methods to easily get the URI parameters from a sever side script.


Hi Chuck,


We are passing the values of   "Comments" field in an order guide to a script include via catalog client script. We are able to retrieve the comments value. But we need to decode the Comments value. Previously we used ->



var jURLdecode = new Packages.java.net.URLDecoder();


var decodedCmts = jURLdecode.decode(cmts);



Now, since we are not able to call Java package, I am not able to find the correct syntax to decode comments.