[][src]Function askama::filters::urlencode_strict

pub fn urlencode_strict(s: &dyn Display) -> Result<String, Error>

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.