Skip to content

Instantly share code, notes, and snippets.

@salex89
Last active August 7, 2016 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salex89/fed4c8fe91fcd2b96746671db4d35d65 to your computer and use it in GitHub Desktop.
Save salex89/fed4c8fe91fcd2b96746671db4d35d65 to your computer and use it in GitHub Desktop.
class JHtmlEscapingFlask(Flask):
def select_jinja_autoescape(self, filename):
if filename is None:
return False
if filename.endswith('.jinja2'):
return True
return Flask.select_jinja_autoescape(self, filename)
app = JHtmlEscapingFlask(__name__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment