aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Gui/Topics.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2015-01-22 16:09:03 -0800
committerMark Sapiro <mark@msapiro.net>2015-01-22 16:09:03 -0800
commit4758a0d904a12d6be21972fa432ad89ed9c1a768 (patch)
tree85d88b27697dd72a55d6470d9e88487bf29568c9 /Mailman/Gui/Topics.py
parentac22662b811ac9bcf58cf001c8fd5ad21e757c8b (diff)
downloadmailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.tar.gz
mailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.tar.xz
mailman2-4758a0d904a12d6be21972fa432ad89ed9c1a768.zip
A number of changes from the unofficial 2.2 branch have been backported to
the 2.1 branch for release with 2.1.19. The 2.2 branch is now no different from the 2.1 branch and will no longer be maintained.
Diffstat (limited to 'Mailman/Gui/Topics.py')
-rw-r--r--Mailman/Gui/Topics.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Mailman/Gui/Topics.py b/Mailman/Gui/Topics.py
index 96f9b421..ec60dbda 100644
--- a/Mailman/Gui/Topics.py
+++ b/Mailman/Gui/Topics.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-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
@@ -29,6 +29,8 @@ except NameError:
True = 1
False = 0
+OR = '|'
+
class Topics(GUIBase):
@@ -126,10 +128,10 @@ class Topics(GUIBase):
# Make sure the pattern was a legal regular expression
name = Utils.websafe(name)
try:
- # Tagger compiles in verbose mode so we do too.
- re.compile(pattern, re.VERBOSE)
+ orpattern = OR.join(pattern.splitlines())
+ re.compile(orpattern)
except (re.error, TypeError):
- safepattern = Utils.websafe(pattern)
+ safepattern = Utils.websafe(orpattern)
doc.addError(_("""The topic pattern '%(safepattern)s' is not a
legal regular expression. It will be discarded."""))
continue