diff options
| -rw-r--r-- | Mailman/Cgi/private.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Mailman/Cgi/private.py b/Mailman/Cgi/private.py index d94a0882f..c9a9088d7 100644 --- a/Mailman/Cgi/private.py +++ b/Mailman/Cgi/private.py @@ -70,16 +70,19 @@ PAGE = ''' login_attempted = 0 _list = None - name_pat = re.compile( - r'(?: / (?: \d{4} q \d\. )?' # Match "/", and, optionally, 1998q1. - r'( [^/]* ) /?' # The SIG name - r'/[^/]*$' # The trailing 12345.html portion - r') | (?:' - r'/ ( [^/.]* )' # Match matrix-sig - r'(?:\.html)?' # Optionally match .html - r'/?' # Optionally match a trailing slash - r'$' # Must match to end of string + r'(?: ' # Being first alternative... + r'/ (?: \d{4} q \d\. )?' # Match "/", and, optionally, 1998q1. + r'( [^/]* ) /?' # The list name + r'/[^/]*$' # The trailing 12345.html portion + r')' # End first alternative + r' | ' + r'(?:' # Begin second alternative... + r'/ ( [^/.]* )' # Match matrix-sig + r'(?:\.html)?' # Optionally match .html + r'/?' # Optionally match a trailing slash + r'$' # Must match to end of string + r')' # And close the second alternate. , re.VERBOSE) def getListName(path): |
