Function minijinja::filters::urlencode

source ·
pub fn urlencode(value: Value) -> Result<String, Error>
Available on crate features builtins and urlencode only.
Expand description

URL encodes a value.

If given a map it encodes the parameters into a query set, otherwise it encodes the stringified value. If the value is none or undefined, an empty string is returned.

<a href="/search?{{ {"q": "my search", "lang": "fr"}|urlencode }}">Search</a>