url_encode - Liquid Filter Reference
On this page
Description
Converts any URL-unsafe characters in a string into percent-encoded characters.
| Property | Value |
|---|---|
| Return Type | string |
| Category | text |
Examples
liquid
{{ "john@example.com" | url_encode }}
Output: john%40example.com
Note that url_encode will turn a space into a + sign instead of a percent-encoded character
liquid
{{ "About Us" | url_encode }}
Output: About+Us