Package: bugs.debian.org
Severity: normal
Tags: patch

on bugs.debian.org, when you set the forward of your bug to :

  http://foo.org/, http://bar.org/

then the BTS translate it in many places into:
  <a href="http://foo.org/, http://bar.org/";>http://foo.org/, 
http://bar.org/</a>
wich is wrong.


  with the use of bts-link that often creates such forwards:

      http://foo.org/1234, merged-upstream: http://bar.org/5678

that bug is quite irritating. a simple way to fix that problem, is to
replace in debbugs cgi/common.pl the function maybelink with the
following implementation:

  sub maybelink {
      my $in = shift;
      my $ans = '';
      foreach my $tok (split /(,? )/, $in) {
          if ($tok =~ /^[a-zA-Z0-9+.-]+:./) { # RFC 1738 scheme
              $ans .= qq{<a href="$tok">} . htmlsanit($tok) . '</a>';
          } else {
              $ans .= htmlsanit($tok);
          }
      }
      return $ans;
  }

  wich basically splits the string into tokens separated by spaces or
', ', and escapes each token with the previous method.


  TIA.
-- 
·O·  Pierre Habouzit
··O                                                [EMAIL PROTECTED]
OOO                                                http://www.madism.org

Reply via email to