------------------------------------------------------------
revno: 1152
committer: Mark Sapiro <[email protected]>
branch nick: 2.1
timestamp: Mon 2008-12-22 18:17:35 -0800
message:
Changed the pattern used to recognize URLs in messages for the pipermail
archive in order to try to do a better job of making hyperlinks.
Bug #310124.
modified:
Mailman/Archiver/HyperArch.py
NEWS
=== modified file 'Mailman/Archiver/HyperArch.py'
--- a/Mailman/Archiver/HyperArch.py 2008-12-19 20:23:41 +0000
+++ b/Mailman/Archiver/HyperArch.py 2008-12-23 02:17:35 +0000
@@ -156,7 +156,12 @@
emailpat = re.compile(r'([-+,.\...@[-+.\w]+)')
# Argh! This pattern is buggy, and will choke on URLs with GET parameters.
-urlpat = re.compile(r'(\w+://[^>)\s]+)') # URLs in text
+# MAS: Given that people are not constrained in how they write URIs in plain
+# text, it is not possible to have a single regexp to reliably match them.
+# The regexp below is intended to match straightforward cases. Even humans
+# can't reliably tell whether various punctuation at the end of a URI is part
+# of the URI or not.
+urlpat = re.compile(r'([a-z]+://.*?)(?:_\s|_$|$|[]})>\'"\s])', re.IGNORECASE)
# Blank lines
blankpat = re.compile(r'^\s*$')
=== modified file 'NEWS'
--- a/NEWS 2008-12-19 20:47:09 +0000
+++ b/NEWS 2008-12-23 02:17:35 +0000
@@ -61,6 +61,10 @@
- Corrected a typo in Mailman/Gui/Privacy.py. Bug #309757.
+ - Changed the pattern used to recognize URLs in messages for the pipermail
+ archive in order to try to do a better job of making hyperlinks.
+ Bug #310124.
+
2.1.11 (30-Jun-2008)
New Features
--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1
You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org