don't throw an error on unclosed conditional tags

This commit is contained in:
Damien Elmes 2012-02-13 12:26:07 +09:00
parent abf6e3fa13
commit bde4420fb0

View file

@ -131,7 +131,7 @@ class Template(object):
func = modifiers[tag_type]
replacement = func(self, tag_name, context)
template = template.replace(tag, replacement)
except SyntaxError:
except (SyntaxError, KeyError):
return u"{{invalid template}}"
return template