]> git.donarmstrong.com Git - debbugs.git/commitdiff
Change how maybelink links links (closes: #501757)
authorDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 19:00:23 +0000 (12:00 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 26 Oct 2008 19:00:23 +0000 (12:00 -0700)
Debbugs/CGI.pm
debian/changelog

index cceeb36cdddf8df589536e2c24bf604be3c5a7b4..3cd4348c4d672ac0832a72c6fc644e5978ce50e3 100644 (file)
@@ -530,6 +530,11 @@ the split links with commas and spaces.
 
 sub maybelink {
     my ($links,$regex,$join) = @_;
+    if (not defined $regex and not defined $join) {
+        $links =~ s{((?:ftp|http|https)://[\S~-]+?/?)([\)\'\:\.\,]?(?:\s|\.<|$))}
+                   {q(<a href=\").html_escape($1).q(\">).html_escape($1).q(</a>).$2}geimo;
+        return $links;
+    }
     $join = ' ' if not defined $join;
     my @return;
     my @segments;
index 7e3d7685a70aeffe5058d0ae9b9a380b34af8487..88e1a611f68ce879a98f03ce7d6b0237588d6352 100644 (file)
@@ -226,6 +226,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
     (closes: #499997)
   * Comment out CGI::Alert use for the time being (closes: #499681)
   * No longer hard-code paths in age-1 (closes: #499682)
+  * Change how maybelink links links (closes: #501757)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100