Edgewall Software

Ticket #5382: trac-spamfilter-b64decode.diff

File trac-spamfilter-b64decode.diff, 0.6 kB (added by Nils Maier <MaierMan@…>, 17 months ago)

proposed patch, v1

  • tracspamfilter/model.py

     
    7979        """Revert the encoding done by `_encode_content` and return an unicode 
    8080        string""" 
    8181        try: 
    82             return to_unicode(content.decode('base64')) 
     82            return to_unicode(str(content).decode('base64')) 
    8383        except (UnicodeEncodeError, binascii.Error): 
    8484            # cope with legacy content (stored before base64 encoding) 
    8585            return to_unicode(content)