Ticket #13694: 13694-2.diff

File 13694-2.diff, 750 bytes (added by Claude Paroz, 12 years ago)

Remove init

  • django/core/mail/message.py

    diff --git a/django/core/mail/message.py b/django/core/mail/message.py
    index 98ab3c9..1b0bbe6 100644
    a b def sanitize_address(addr, encoding):  
    121121
    122122class SafeMIMEText(MIMEText):
    123123
    124     def __init__(self, text, subtype, charset):
    125         self.encoding = charset
    126         MIMEText.__init__(self, text, subtype, charset)
    127 
    128124    def __setitem__(self, name, val):
    129         name, val = forbid_multi_line_headers(name, val, self.encoding)
     125        encoding = self._charset.input_charset if self._charset else None
     126        name, val = forbid_multi_line_headers(name, val, encoding)
    130127        MIMEText.__setitem__(self, name, val)
    131128
    132129    def as_string(self, unixfrom=False):
Back to Top