Percent-encodes unsafe URL characters.
{{ value | url_escape }}
{{ "hello world!" | url_escape }}
Output:
hello%20world%21