From 6d63293031eb92a35c85b10224933127700ea818 Mon Sep 17 00:00:00 2001
From: cjwatson <>
Date: Tue, 3 Feb 2004 22:14:32 -0800
Subject: [PATCH] [project @ 2004-02-03 22:14:32 by cjwatson] Add named anchors
 to the start of each message in a bug.

---
 cgi/bugreport.cgi | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi
index c5339f19..c287311e 100755
--- a/cgi/bugreport.cgi
+++ b/cgi/bugreport.cgi
@@ -320,7 +320,7 @@ while(my $line = <L>) {
 					$this = "<pre>\n$this</pre>\n";
 				}
 				if ($normstate eq 'html') {
-					$this .= "  <em><a href=\"" . bugurl($ref, "msg=$xmessage") . "\">Full text</a> available.</em>";
+					$this = "<a name=\"msg$xmessage\">$this  <em><a href=\"" . bugurl($ref, "msg=$xmessage") . "\">Full text</a> available.</em></a>";
 				}
 				$this = "$thisheader$this" if $thisheader && !( $normstate eq 'html' );;
 				$thisheader = '';
@@ -349,8 +349,9 @@ while(my $line = <L>) {
 		$pl =~ s/\n+$//;
 		m/^Received: \(at (\S+)\) by (\S+)\;/
 			|| &quitcgi("bad line \`$pl' in state incoming-recv");
-		$thisheader = "<h2>Message received at ".htmlsanit("$1\@$2")
-		        . ":</h2>\n";
+		$thisheader = "<h2><a name=\"msg$xmessage\">"
+			. "Message received at ".htmlsanit("$1\@$2")
+			. ":</a></h2>\n";
 		$this = '';
 		$normstate= 'go';
 		push @mail, $_;
-- 
2.39.5