Sample Code:
String strURL = 'www.test.com?name=#1solutions';
strURL = EncodingUtil.urlEncode(strURL, 'UTF-8');
EncodingUtil.urlEncode() encodes the special characters for correct URL String.
Cheers!!!
String strURL = 'www.test.com?name=#1solutions';
strURL = EncodingUtil.urlEncode(strURL, 'UTF-8');
EncodingUtil.urlEncode() encodes the special characters for correct URL String.
Cheers!!!
how to decode url in salesforce lightning component
ReplyDeleteCheck this - http://www.infallibletechie.com/2018/06/how-to-encodedecode-url-in-salesforce.html
Delete