Function gtmpl::funcs::urlquery[][src]

pub fn urlquery(args: &[Value]) -> Result<Value, FuncError>
Expand description

Returns the escaped value of the textual representation of its arguments in a form suitable for embedding in a URL query.

Example

use gtmpl::template;
let url = template(r#"{{ urlquery "foo bar?" }}"#, 0);
assert_eq!(&url.unwrap(), "foo%20bar%3F");