From: Frank Lichtenheld Date: Sun, 27 Mar 2016 13:26:20 +0000 (+0200) Subject: Bugreport: Fix problems with reassign message X-Git-Tag: release/2.6.0~212 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8e8eb43880421931c57b44123a1684f247011934;hp=62a85a600ce5772b358eff9e15b42d5e05780463;p=debbugs.git Bugreport: Fix problems with reassign message * 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 --- diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index b1be2ed..8ebbfe8 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -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;|\"\;) + $output =~ s{($config{bug}\sreassigned\sfrom\spackage\s(?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;|\"\;) \sto\s(?:[\`']|\&\#39;|\"\;))([^']+?)((?:'|\&\#39;|\"\;))} - {$1.q($2).$3. - q($4).$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)).') '; }