On Sun, Jan 21, 2007 at 06:23:56PM -0800, Don Armstrong wrote: > On Sun, 21 Jan 2007, Matt Kraai wrote: > > If an email to the BTS contains a URL followed by a semicolon (see > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381576, for example), > > the semicolon is included in the link, causing it to fail. > > > > I think that if a URL is followed by punctuation, the punctuation > > should not be treated as part of the URL. > > Unfortunatly, a semicolon is a perfectly valid thing to have in a URL, > even to end an URL with.
Thanks for considering it. I think it's probably more common to follow a URL with a semicolon than to have a URL that ends with one, but I don't have any evidence to support this. > The link marking regex is definetly not infallible, but it tries it's > best. You're welcome to suggest a more complete one than the current > implementation: > > $body =~ s,((ftp|http|https)://[\S~-]+?/?)((\>\;)?[)]?[']?[:.\,]?(\s|$)),<a > href=\"$1\">$1</a>$3,go; The (untested) updated command would be $body =~ s,((ftp|http|https)://[\S~-]+?/?)((\>\;)?[)]?[']?[:.\,;]?(\s|$)),<a href=\"$1\">$1</a>$3,go; -- Matt http://ftbfs.org/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]