From fc5addc456e93c3ae07fd35fbad0d14d578e5b3c Mon Sep 17 00:00:00 2001 From: Daniel Wiesenberg Date: Tue, 5 Feb 2019 23:38:32 +0100 Subject: Make html-escaper also escape .j2, .jinja and .jinja2 files --- askama_shared/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'askama_shared') diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 0daad1b..8014b88 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -226,6 +226,7 @@ static DEFAULT_SYNTAX_NAME: &str = "default"; static DEFAULT_ESCAPERS: &[(&[&str], &str)] = &[ (&["html", "htm", "xml"], "::askama::Html"), (&["none", "txt", ""], "::askama::Text"), + (&["j2", "jinja", "jinja2"], "::askama::Html"), ]; #[cfg(test)] @@ -404,6 +405,7 @@ mod tests { (str_set(&["js"]), "::askama::Js".into()), (str_set(&["html", "htm", "xml"]), "::askama::Html".into()), (str_set(&["none", "txt", ""]), "::askama::Text".into()), + (str_set(&["j2", "jinja", "jinja2"]), "::askama::Html".into()), ] ); } -- cgit