Jim Popovitch wrote:
>
>I have a problem with some URLs being handled incorrectly.
>Specifically URLs that are at the end of a sentence followed by a
>period (full stop).   Example:
>
>   To enroll visit this site: http://www.domain.tld/cgi-bin/enroll.pl.
>
>Mailman/Pipermail converts that sentence like so:
>
>  To enroll visit this site: <A
>HREF="http://www.domain.tld/cgi-bin/enroll.pl.";>http://www.domain.tld/cgi-bin/enroll.pl.</A>
>
>The ending period (full stop) then invalidates the URL.
>
>Is there any quick fix to 2.1.9 to resolve this?


You could try to find the line

urlpat = re.compile(r'(\w+://[^>)\s]+)') # URLs in text

near the beginning of Mailman/Archiver/HyperArch.py and change it to

urlpat = re.compile(r'(\w+://[^>)\s]+?)\.?(\s|$)') # URLs in text

Note this re is very lightly tested and may not work in all cases.

Of course, if you can get the posters to surround their URLs with <>,
there is no problem.

-- 
Mark Sapiro <[EMAIL PROTECTED]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to