------------------------------------------------------------
revno: 1661
fixes bug: https://launchpad.net/bugs/558155
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Tue 2016-07-12 11:29:42 -0700
message:
Use xmlcharrefreplace 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-07-11 23:43:25 +0000
+++ Mailman/Handlers/SpamDetect.py 2016-07-12 18:29:42 +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, 'backslashreplace'))
+ headers += '%s: %s\n' % (h, uvalue.encode(cset, 'xmlcharrefreplace'))
return headers
=== modified file 'NEWS'
--- NEWS 2016-07-11 23:43:25 +0000
+++ NEWS 2016-07-12 18:29:42 +0000
@@ -11,11 +11,11 @@
- 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
+ errors='xmlcharrefreplace' 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)
+ list's preferred language will now be represented as '&#nnnn;' XML
+ character references 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
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org