Ticket #924: 924.1.diff

File 924.1.diff, 608 bytes (added by Maniac <Maniac@…>, 19 years ago)

Patch: operate on unicode strings

  • django/core/template/__init__.py

     
    620620    except VariableDoesNotExist:
    621621        obj = ''
    622622    for name, arg in filters:
    623         obj = registered_filters[name][0](obj, arg)
     623        if type(obj) == str:
     624            obj = registered_filters[name][0](obj.decode(DEFAULT_CHARSET), arg).encode(DEFAULT_CHARSET)
     625        else:
     626            obj = registered_filters[name][0](obj, arg)
    624627    return obj
    625628
    626629class Node:
Back to Top