Ticket #4749: defaultfilters.py.diff

File defaultfilters.py.diff, 448 bytes (added by marc.garcia@…, 17 years ago)

Possible fix to this bug (to be reviewed)

  • defaultfilters.py

    old new  
    141141
    142142def title(value):
    143143    "Converts a string into titlecase"
    144     return re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title())
     144    return re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.decode('utf-8').title())
    145145title = stringfilter(title)
    146146
    147147def truncatewords(value, arg):
Back to Top