From: bugreport%peshkin.net <> Date: Wed, 12 May 2004 12:08:28 +0000 (+0000) Subject: Bug 232861: Prevent references to bugs or comments from being expanded in attachment... X-Git-Tag: bugzilla-2.18rc1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce5d97efa0895d090493cf7ea5865f8684653af7;p=thirdparty%2Fbugzilla.git Bug 232861: Prevent references to bugs or comments from being expanded in attachment links r=timeless,a=justdave --- diff --git a/globals.pl b/globals.pl index 3670ff508a..055584f7ef 100644 --- a/globals.pl +++ b/globals.pl @@ -875,13 +875,15 @@ sub quoteUrls { $text =~ s~\b(mailto:|)?([\w\.\-\+\=]+\@[\w\-]+(?:\.[\w\-]+)+)\b ~$1$2~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