@schnerring identified an undocumented function:
{{ urlquery "https://example.com" }} --> https%3A%2F%2Fexample.com
The function takes one or more args, producing a single string.
{{ urlquery "https:/" "/example.com" }} --> https%3A%2F%2Fexample.com