urlEncode

urlEncode ( string textOrUrl , boolean _excludeHttpCaracters , boolean _use%20insteadOf+ ) : string

Encodes URL-encoded string

Example


console("http://whereRedirect.com?redirect="+urlEncode("https://www.idia-tech.com/urlEncode.html")) //-> http://whereRedirect.com?redirect=https%3A%2F%2Fwww.idia-tech.com%2FurlEncode.html


See also

urlDecode

Parameters

textOrUrl

text to encode

_excludeHttpCaracters (optional)

default:false
excludeHttpCaracters exclude :, / and # of the url decoding

_use%20insteadOf+ (optional)

default:true
There are 2 formats for handling spaces in a URL. By default they are replaced by +, with this option you replace them by %20.