Path 1: 62 calls (0.72)

'template_filter.html' (18) 'template_test.html' (18) 'simple_template.html' (6) 'frontend/index.html' (2) 'admin/index.html' (2) './admin/index.html'...

True (56) False (6)

1def select_jinja_autoescape(self, filename: str) -> bool:
2        """Returns ``True`` if autoescaping should be active for the given
3        template name. If no template name is given, returns `True`.
4
5        .. versionchanged:: 2.2
6            Autoescaping is now enabled by default for ``.svg`` files.
7
8        .. versionadded:: 0.5
9        """
10        if filename is None:
11            return True
12        return filename.endswith((".html", ".htm", ".xml", ".xhtml", ".svg"))
            

Path 2: 24 calls (0.28)

None (24)

True (24)

1def select_jinja_autoescape(self, filename: str) -> bool:
2        """Returns ``True`` if autoescaping should be active for the given
3        template name. If no template name is given, returns `True`.
4
5        .. versionchanged:: 2.2
6            Autoescaping is now enabled by default for ``.svg`` files.
7
8        .. versionadded:: 0.5
9        """
10        if filename is None:
11            return True
12        return filename.endswith((".html", ".htm", ".xml", ".xhtml", ".svg"))