diff options
author | Daniel Wiesenberg <weasy@hotmail.de> | 2019-02-05 23:38:32 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2019-02-06 08:38:16 +0100 |
commit | fc5addc456e93c3ae07fd35fbad0d14d578e5b3c (patch) | |
tree | 3ad87d7a9bc2840614647de628b37bb54a5d6a96 /askama_shared | |
parent | a1b5a9ee2e3ce42c4c5bd52adda2879e902540c6 (diff) | |
download | askama-fc5addc456e93c3ae07fd35fbad0d14d578e5b3c.tar.gz askama-fc5addc456e93c3ae07fd35fbad0d14d578e5b3c.tar.bz2 askama-fc5addc456e93c3ae07fd35fbad0d14d578e5b3c.zip |
Make html-escaper also escape .j2, .jinja and .jinja2 files
Diffstat (limited to 'askama_shared')
-rw-r--r-- | askama_shared/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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()), ] ); } |