]> git.donarmstrong.com Git - debbugs.git/commitdiff
Bugreport: Fix problems with reassign message
authorFrank Lichtenheld <frank@lichtenheld.de>
Sun, 27 Mar 2016 13:26:20 +0000 (15:26 +0200)
committerDon Armstrong <don@donarmstrong.com>
Tue, 29 Mar 2016 00:06:00 +0000 (17:06 -0700)
* Matched hardcoded "Bug" instead of $config{bug} (which leads
  to problems at least in the test suite)
* Use package_links() wrong. package_links() already adds HTML.
  (Closes: #767327)

Signed-off-by: Don Armstrong <don@donarmstrong.com>
Debbugs/CGI/Bugreport.pm

index b1be2ed4dfe9e954ee36b25613b02b38e174ccb9..8ebbfe8341a64e72f1ef1ad9643d4c437c6f8706 100644 (file)
@@ -395,10 +395,10 @@ sub handle_record{
                      {$1.$2.(bug_links(bug=>$3)).$4.
                           english_join([map {bug_links(bug=>$_)} (split /\,?\s+(?:and\s+)?/, $5)])}eo;
          # Add links to reassigned packages
-         $output =~ s{(Bug\sreassigned\sfrom\spackage\s(?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;|\&quot\;)
+         $output =~ s{($config{bug}\sreassigned\sfrom\spackage\s(?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;|\&quot\;)
                                \sto\s(?:[\`']|\&\#39;|\&quot\;))([^']+?)((?:'|\&\#39;|\&quot\;))}
-         {$1.q(<a href=").html_escape(package_links(package=>$2)).qq(">$2</a>).$3.
-               q(<a href=").html_escape(package_links(package=>$4)).qq(">$4</a>).$5}exo;
+         {$1.package_links(package=>$2).$3.
+               package_links(package=>$4).$5}exo;
          if (defined $time) {
               $output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') ';
          }