An add-on for Expression Engine 3 or newer to url encode strings with the PHP rawurlencode() function or urlencode() function.
- Copy the urlencoder directory into your system/user/addons folder
- Login to your Expression Engine installation, go to Developer --> Add-Ons
- Install the urlencoder add-on
{exp:urlencoder}String you want to encode{/exp:urlencoder}
{exp:urlencoder raw="no"}String you want to encode{/exp:urlencoder}
The urlencoder add-on will turn this:
{exp:urlencoder}String you want to encode{/exp:urlencoder}
into this:
String%20you%20want%20to%20encode
And this:
{exp:urlencoder raw="no"}String you want to encode{/exp:urlencoder}
into this:
String+you+want+to+encode