added from __future__ import unicode_literals, removed utf-8 encoding, added exception catching to template filter