url_param_escape Filter
Replaces all characters not allowed in URLs with their
URL-encoded equivalents, including the ampersand
(&) character.
Parameters
None.
Category
Description
Replaces all characters not allowed in URLs with their
URL-encoded equivalents, including the ampersand
(&) character.
{{ '<hello> & <liveeditor>' | url_param_escape }}
Example Output
%3Chello%3E%20%26%20%3Cliveeditor%3E
If you want to leave the ampersand character (&) unchanged, instead use the
url_escape filter.