]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 232861: Prevent references to bugs or comments from being expanded in attachment...
authorbugreport%peshkin.net <>
Wed, 12 May 2004 12:08:28 +0000 (12:08 +0000)
committerbugreport%peshkin.net <>
Wed, 12 May 2004 12:08:28 +0000 (12:08 +0000)
r=timeless,a=justdave

globals.pl

index 3670ff508a74d6d9d6ead1863f0eb923a4b7a13f..055584f7ef6d2cc24c743c6ec369531a101f351d 100644 (file)
@@ -875,13 +875,15 @@ sub quoteUrls {
     $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b
               ~<a href=\"mailto:$2\">$1$2</a>~igx;
 
-    # attachment links - handle both cases separatly for simplicity
+    # attachment links - handle both cases separately for simplicity
     $text =~ s~((?:^Created\ an\ |\b)attachment\s*\(id=(\d+)\))
-              ~GetAttachmentLink($2, $1)
+              ~($things[$count++] = GetAttachmentLink($2, $1)) &&
+               ("\0\0" . ($count-1) . "\0\0")
               ~egmx;
 
     $text =~ s~\b(attachment\s*\#?\s*(\d+))
-              ~GetAttachmentLink($2, $1)
+              ~($things[$count++] = GetAttachmentLink($2, $1)) &&
+               ("\0\0" . ($count-1) . "\0\0")
               ~egmxi;
 
     # This handles bug a, comment b type stuff. Because we're using /g