]> git.donarmstrong.com Git - debbugs.git/commitdiff
allow " in other places too (HTML::Escape doesn't always use ' anymore)
authorDon Armstrong <don@donarmstrong.com>
Fri, 21 Nov 2014 23:02:55 +0000 (15:02 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 15 Jan 2015 00:31:55 +0000 (16:31 -0800)
Debbugs/CGI/Bugreport.pm

index 00619fc47a70d99a0b1c50fc9575760a510e576c..02f30c2f1c551114c226007173cf135edcd60a9b 100644 (file)
@@ -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|\.<|$)),<a href=\"$1\">$1</a>$2,go;
+         $output =~ s,((?:ftp|http|https)://[\S~-]+?/?)((?:[\)\'\:\.\,]|\&\#39;|\&quot\;)?
+                           (?:\s|\.<|$)),<a href=\"$1\">$1</a>$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(<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}eo;
+         $output =~ s{(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;
          if (defined $time) {
               $output .= ' ('.strftime('%a, %d %b %Y %T GMT',gmtime($time)).') ';
          }