From cb51f78717fbd1f6187b61fe0b2d1e06859a3018 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 12 Jul 2016 11:29:42 -0700 Subject: Use xmlcharrefreplace when encoding for header_filter_rules. --- Mailman/Handlers/SpamDetect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/SpamDetect.py b/Mailman/Handlers/SpamDetect.py index 1ea295a6..de19adfc 100644 --- a/Mailman/Handlers/SpamDetect.py +++ b/Mailman/Handlers/SpamDetect.py @@ -86,7 +86,7 @@ def getDecodedHeaders(msg, cset='utf-8'): # unicode it as iso-8859-1 which may result in a garbled # mess, but we have to do something. uvalue += unicode(frag, 'iso-8859-1', 'replace') - headers += '%s: %s\n' % (h, uvalue.encode(cset, 'backslashreplace')) + headers += '%s: %s\n' % (h, uvalue.encode(cset, 'xmlcharrefreplace')) return headers -- cgit v1.2.3