rocket_dyn_templates::minijinja::filters

Function urlencode

Source
pub fn urlencode(value: Value) -> Result<String, Error>
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>