------------------------------------------------------------ revno: 1660 fixes bug: https://launchpad.net/bugs/558155 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Mon 2016-07-11 16:43:25 -0700 message: Use backslashreplace when encoding for header_filter_rules. modified: Mailman/Handlers/SpamDetect.py NEWS
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/Handlers/SpamDetect.py' --- Mailman/Handlers/SpamDetect.py 2016-01-18 23:56:58 +0000 +++ Mailman/Handlers/SpamDetect.py 2016-07-11 23:43:25 +0000 @@ -86,7 +86,7 @@ # 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, 'replace')) + headers += '%s: %s\n' % (h, uvalue.encode(cset, 'backslashreplace')) return headers === modified file 'NEWS' --- NEWS 2016-06-18 19:26:59 +0000 +++ NEWS 2016-07-11 23:43:25 +0000 @@ -9,6 +9,14 @@ New Features + - RFC 2047 encoded headers are now decoded and re-encoded in the charset of + the list's preferred language for matching by header_filter_rules using + errors='backslashreplace' instead of the former errors='replace'. This + means that characters that can't be represented in the charset of the + list's preferred language will now be represented as '\uxxxx' escapes + rather than '?' enabling regexps to be constructed to match specific + characters or ranges. (LP: #558155) + - Thanks to Jim Popovitch REMOVE_DKIM_HEADERS can now be set to 3 to preserve the original headers as X-Mailman-Original-... before removing them.
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org