From: Don Armstrong Date: Fri, 21 Nov 2014 23:02:55 +0000 (-0800) Subject: allow " in other places too (HTML::Escape doesn't always use ' anymore) X-Git-Tag: release/2.6.0~243^2~8 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=a4c38b614a8350d84a53e942aca0d2914d9c56df allow " in other places too (HTML::Escape doesn't always use ' anymore) --- diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index 00619fc..02f30c2 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -369,7 +369,8 @@ sub handle_record{ $output .= $text; # Link to forwarded http:// urls in the midst of the report # (even though these links already exist at the top) - $output =~ s,((?:ftp|http|https)://[\S~-]+?/?)((?:[\)\'\:\.\,]|\&\#39;)?(?:\s|\.<|$)),$1$2,go; + $output =~ s,((?:ftp|http|https)://[\S~-]+?/?)((?:[\)\'\:\.\,]|\&\#39;|\"\;)? + (?:\s|\.<|$)),$1$2,gxo; # Add links to the cloned bugs $output =~ s{(Bug )(\d+)( cloned as bugs? )(\d+)(?:\-(\d+)|)}{$1.bug_links(bug=>$2).$3.bug_links(bug=>(defined $5)?[$4..$5]:$4)}eo; # Add links to merged bugs @@ -386,8 +387,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 reassigned from package (?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;) to (?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;))} - {$1.q($2).$3.q($4).$5}eo; + $output =~ s{(Bug\sreassigned\sfrom\spackage\s(?:[\`']|\&\#39;))([^']+?)((?:'|\&\#39;|\"\;) + \sto\s(?:[\`']|\&\#39;|\"\;))([^']+?)((?:'|\&\#39;|\"\;))} + {$1.q($2).$3. + q($4).$5}exo; if (defined $time) { $output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') '; }