Looks fine. I've been looking at http://jinja.pocoo.org/docs/api/#jinja2.Markup a lot lately for my own project. It's a good read and has alternative paths to escape and unescape stuff. Not sure how it interacts with Django's new-in-1.5 https://docs.djangoproject.com/en/1.6/ref/utils/#django.utils.safestring.mark_safe, which I just learned about.