encode

Description

Escape an URI. Useful when using Liquid to generate a JSON response.

Syntax

{{ <URI> | encode }}

Example

{{ "http:://www.example.com?key=hello world" | encode }}

outputs

http%3A%3A%2F%2Fwww.example.com%3Fkey%3Dhello+world
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top