From 8e8eb43880421931c57b44123a1684f247011934 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 27 Mar 2016 15:26:20 +0200 Subject: [PATCH] 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 --- Debbugs/CGI/Bugreport.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)).') '; } -- 2.39.2