]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-06-20 18:13:01 by cjwatson]
authorcjwatson <>
Sat, 21 Jun 2003 01:13:01 +0000 (17:13 -0800)
committercjwatson <>
Sat, 21 Jun 2003 01:13:01 +0000 (17:13 -0800)
By default, the MIME-tools treat message/* parts as singlepart messages but
nevertheless implement the parts() method for them so that you can drill
down into the nested messages. Until now we were just displaying an
attachment link for message/* but not the actual message, which was a bit
unhelpful. Instead, we now decode and display the inner message within a
<blockquote> tag.

(Test case first spotted at nCipher, but see
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93268&msg=60 for an
example.)

cgi/bugreport.cgi
debian/changelog

index a0d100b5bb8e0be5bf59ad64f2f2361bd76b19ca..9ee2e2a6f227efe3bbf761b4c3452bc4a56e1250 100755 (executable)
@@ -100,7 +100,7 @@ sub display_entity ($$$$\$\@) {
     return if $disposition eq 'attachment' and not defined($att);
     return unless ($type =~ m[^text/?] and $type !~ m[^text/html(?:;|$)]) or
                  $type =~ m[^application/pgp(?:;|$)] or
-                 $entity->is_multipart;
+                 $entity->parts;
 
     if ($entity->is_multipart) {
        my @parts = $entity->parts;
@@ -109,6 +109,16 @@ sub display_entity ($$$$\$\@) {
                           $$this, @$attachments);
            $$this .= "\n";
        }
+    } elsif ($entity->parts) {
+       # We must be dealing with a nested message.
+       $$this .= "<blockquote>\n";
+       my @parts = $entity->parts;
+       foreach my $part (@parts) {
+           display_entity($part, $ref, 1, $xmessage,
+                          $$this, @$attachments);
+           $$this .= "\n";
+       }
+       $$this .= "</blockquote>\n";
     } else {
        $$this .= htmlsanit($entity->bodyhandle->as_string) unless ($terse);
     }
index 482deb4b23928baa9836adcede0ce14c763901dc..bf121341a6748e1b989a8705914967f17e6e0bae 100644 (file)
@@ -1,3 +1,10 @@
+debbugs (2.4.2) UNRELEASED; urgency=low
+
+  * Colin Watson:
+    - Add (slightly) fancy CGI decoding of message/* MIME types.
+
+ -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
+
 debbugs (2.4.1) unstable; urgency=low
 
   * Colin Watson: