]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-03-04 18:07:40 by joy]
authorjoy <>
Wed, 5 Mar 2003 02:07:40 +0000 (18:07 -0800)
committerjoy <>
Wed, 5 Mar 2003 02:07:40 +0000 (18:07 -0800)
various HTML fixes, mostly to avoid broken <pre>s

cgi/bugreport.cgi

index 1c6f1d4b9f931f26de3162e9c7017fb89ab7e092..9b4df6ac29a28fdb6083d95bb5a25988678f004b 100755 (executable)
@@ -180,10 +180,11 @@ while(my $line = <L>) {
                        &quit("$ref: Transition from $normstate to $newstate at $linenum disallowed");
                }
 
-               if ($newstate eq 'go') {
-                       $this .= "<pre>\n";
-               }
+#$this .= "\n<br>states: $normstate $newstate<br>\n";
 
+#              if ($newstate eq 'go') {
+#                      $this .= "<pre>\n";
+#              }
                if ($newstate eq 'html') {
                        $this = '';
                }
@@ -253,13 +254,15 @@ while(my $line = <L>) {
                                }
                                $this = "$downloadHtml\n$this$downloadHtml" if $downloadHtml;
                                $downloadHtml = '';
-                               $this = "<pre>\n$this</pre>\n"
-                                       if $normstate eq 'go' || $normstate eq 'go-nox';
-                               $this = "$thisheader$this" if $thisheader && !( $normstate eq 'html' );;
-                               $thisheader = '';
+#                              if ($normstate eq 'go' || $normstate eq 'go-nox') {
+                               if ($normstate ne 'html') {
+                                       $this = "<pre>\n$this</pre>\n";
+                               }
                                if ($normstate eq 'html') {
-                                       $this .= "  <em><A href=\"" . bugurl($ref, "msg=$xmessage") . "\">Full text</A> available.</em>";
+                                       $this .= "  <em><a href=\"" . bugurl($ref, "msg=$xmessage") . "\">Full text</a> available.</em>";
                                }
+                               $this = "$thisheader$this" if $thisheader && !( $normstate eq 'html' );;
+                               $thisheader = '';
                                if ($reverse) {
                                        $log = "$this\n<hr>$log";
                                } else {
@@ -306,11 +309,12 @@ while(my $line = <L>) {
                }
         } elsif ($normstate eq 'recips') {
                if (m/^-t$/) {
-                       $this = "<h2>Message sent:</h2>\n";
+                       $thisheader = "<h2>Message sent:</h2>\n";
                } else {
                        s/\04/, /g; s/\n$//;
-                       $this = "<h2>Message sent to ".htmlsanit($_).":</h2>\n";
+                       $thisheader = "<h2>Message sent to ".htmlsanit($_).":</h2>\n";
                }
+               $this = "";
                $normstate= 'kill-body';
        } elsif ($normstate eq 'autocheck') {
                next if !m/^X-Debian-Bugs(-\w+)?: This is an autoforward from (\S+)/;
@@ -361,7 +365,7 @@ print "<H1>" .  "$debbugs::gProject $debbugs::gBug report logs - <A HREF=\"mailt
       "<BR>" . htmlsanit($status{subject}) . "</H1>\n";
 
 print "$descriptivehead\n";
-printf "<p>View this report as an <a href=\"%s\">mbox folder</a>.</p>", mboxurl($ref);
+printf "<p>View this report as an <a href=\"%s\">mbox folder</a>.</p>\n", mboxurl($ref);
 print "<HR>";
 print "$log";
 print $tail_html;