Ticket #4842: defaultfilter_replace.diff

File defaultfilter_replace.diff, 520 bytes (added by Thomas Güttler <hv@…>, 17 years ago)
  • django/template/defaultfilters.py

     
    556556    try:
    557557        return pformat(value)
    558558    except Exception, e:
    559         return u"Error in formatting:%s" % force_unicode(e)
     559        return u"Error in formatting:%s" % force_unicode(e, errors="replace")
    560560
    561561# Syntax: register.filter(name of filter, callback)
    562562register.filter(add)
Back to Top