]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/bugreport.cgi
- Fix double leading spaces of format=flowed messages
[debbugs.git] / cgi / bugreport.cgi
index b001d91a303521539caee82d69fa78987f0905db..24b51e49306cfba4071942a96027aba85c87e1f9 100755 (executable)
@@ -176,6 +176,12 @@ sub display_entity ($$$$\$\@) {
              my $body = $entity->bodyhandle->as_string;
              $body = convert_to_utf8($body,$charset) if defined $charset;
              $body = html_escape($body);
+             # Attempt to deal with format=flowed
+             if ($content_type =~ m/format\s*=\s*\"?flowed\"?/i) {
+                  $body =~ s{^\s}{}mgo;
+                  # we ignore the other things that you can do with
+                  # flowed e-mails cause they don't really matter.
+             }
              # Add links to URLs
              $body =~ s,((ftp|http|https)://[\S~-]+?/?)((\&gt\;)?[)]?[']?[:.\,]?(\s|$)),<a href=\"$1\">$1</a>$3,go;
              # Add links to bug closures