1. Home
  2. Docs
  3. Flexie CRM Methods
  4. urlEncode method

urlEncode method

Method

urlEncode — URL – encodes a string

Description

This method is useful when encoding a string  that can be used in a query part of a URL. After encoding all non-Alphanumeric characters will be replaced with a % sign except the  -_. characters followed by two hexadecimal digits. The space will be replaced with + sign.

Minimum number of  arguments for this method is one.

Structure of the method:

urlEncode(string)

Parameters

string— is the string or URL we want to URL-encode

Examples

In the example below, we URL-encode a given URL string.

{% set result = urlEncode('https//flexie.io/resources')%} 

//Output: https%3A%2F%2Fflexie.io%2Fresources

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy and subscribe to our YouTube channel Flexie CRM.

How can we help?