aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-04-13 15:17:02 -0700
committerMark Sapiro <mark@msapiro.net>2015-04-13 15:17:02 -0700
commit0872fe8ebdb83e2f864c94201b57121e20c3fb7d (patch)
treec42aff58d1a40ee64cdb7620ae17cc0278c6e3e3
parent3b09abab98d46292d0e95d214935316385dadf93 (diff)
downloadmailman2-0872fe8ebdb83e2f864c94201b57121e20c3fb7d.tar.gz
mailman2-0872fe8ebdb83e2f864c94201b57121e20c3fb7d.tar.xz
mailman2-0872fe8ebdb83e2f864c94201b57121e20c3fb7d.zip
Improved search in admin UI Membership List.
-rw-r--r--Mailman/Cgi/admin.py11
-rwxr-xr-xNEWS8
2 files changed, 18 insertions, 1 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py
index 4cd619bb..370a2507 100644
--- a/Mailman/Cgi/admin.py
+++ b/Mailman/Cgi/admin.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2014 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -911,6 +911,15 @@ def membership_options(mlist, subcat, cgidata, doc, form):
all.sort(lambda x, y: cmp(x.lower(), y.lower()))
# See if the query has a regular expression
regexp = cgidata.getvalue('findmember', '').strip()
+ try:
+ regexp = regexp.decode(Utils.GetCharSet(mlist.preferred_language))
+ except UnicodeDecodeError:
+ # This is probably a non-ascii character and an English language
+ # (ascii) list. Even if we didn't throw the UnicodeDecodeError,
+ # the input may have contained mnemonic or numeric HTML entites mixed
+ # with other characters. Trying to grok the real meaning out of that
+ # is complex and error prone, so we don't try.
+ pass
if regexp:
try:
cre = re.compile(regexp, re.IGNORECASE)
diff --git a/NEWS b/NEWS
index e4cf8e60..bd28333e 100755
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,14 @@ Copyright (C) 1998-2015 by the Free Software Foundation, Inc.
Here is a history of user visible changes to Mailman.
+2.1.21 (xx-xxx-xxxx)
+
+ Bug fixes and other patches
+
+ - The list admin web UI Mambership List search function often doesn't
+ return correct results for search strings (regexps) that contain
+ non-ascii characters. This is partially fixed. (LP: #1442298)
+
2.1.20 (31-Mar-2015)
Security