#![feature(proc_macro)] #[macro_use] extern crate askama_derive; extern crate askama; use askama::Template; #[derive(Template)] #[template(path = "filters.html")] struct TestTemplate { strvar: String, } #[test] fn filter_escape() { let s = TestTemplate { strvar: "my is unsafe & should be escaped".to_string(), }; assert_eq!(s.render(), "my <html> is unsafe & should be escaped\n"); }