minijinja

Function default_auto_escape_callback

Source
pub fn default_auto_escape_callback(name: &str) -> AutoEscape
Expand description

The default logic for auto escaping based on file extension.

  • Html: .html, .htm, .xml
  • Json: .json, .json5, .js, .yaml, .yml
  • None: all others

Additionally .j2 as final extension is ignored. So .html.j2 is the considered the same as .html.