]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 652663 - When using bug_format_comment hook some replacements can happen more...
authorDavid Lawrence <dlawrence@mozilla.com>
Mon, 25 Jul 2011 05:29:43 +0000 (01:29 -0400)
committerDavid Lawrence <dlawrence@mozilla.com>
Mon, 25 Jul 2011 05:29:43 +0000 (01:29 -0400)
r/a=LpSolit

Bugzilla/Template.pm

index f58128eec0e83e70fe47e1bbd0f64e1ffca209b1..4320121bfbe6cea63427ccc1625fa8423a337fb9 100644 (file)
@@ -257,8 +257,10 @@ sub quoteUrls {
               ~get_bug_link($1, $1)
               ~egmx;
 
-    # Now remove the encoding hacks
-    $text =~ s/\0\0(\d+)\0\0/$things[$1]/eg;
+    # Now remove the encoding hacks in reverse order
+    for (my $i = $#things; $i >= 0; $i--) {
+        $text =~ s/\0\0($i)\0\0/$things[$i]/eg;
+    }
     $text =~ s/$chr1\0/\0/g;
 
     return $text;