]> 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:23:58 +0000 (01:23 -0400)
committerDavid Lawrence <dlawrence@mozilla.com>
Mon, 25 Jul 2011 05:23:58 +0000 (01:23 -0400)
r/a=LpSolit

Bugzilla/Template.pm

index 726ca1ca3b9005c5c0c5495c82809ad9e22c535c..d8822272fc5623117fa584faf50560e3ffc09b71 100644 (file)
@@ -264,8 +264,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;