pub fn urlencode_strict<T: Display>(s: T) -> Result<String>
Expand description

Percent-encodes the argument for safe use in URI; encodes /.

Use this filter for encoding query keys and values in the rare case that the server can’t process them unencoded.

Encodes all characters except ASCII letters, digits, and _.-~. In other words, encodes all characters which are not in the unreserved set, as specified by RFC3986.

<a href="/page?text={{ "look, unicode/emojis ✨"|urlencode_strict }}">Page</a>

If you want to preserve /, see urlencode.