Created
December 25, 2014 06:15
-
-
Save vmagamedov/9207bc496ddbe6bbade0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Env(jinja2.sandbox.SandboxedEnvironment): | |
def is_safe_attribute(self, obj, attr, value): | |
if isinstance(obj, basestring) and attr == 'format': | |
return False | |
return super(Env, self).is_safe_attribute(obj, attr, value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment