X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDownload%2FCustomFieldValue%2Fdhandler;h=069f2c00fdbfce4dde87bf98eec90b5faccd2c5e;hp=5149de1d0b64dd4ab3bafc3b49b8afd98681e087;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/rt/share/html/Download/CustomFieldValue/dhandler b/rt/share/html/Download/CustomFieldValue/dhandler index 5149de1d0..069f2c00f 100644 --- a/rt/share/html/Download/CustomFieldValue/dhandler +++ b/rt/share/html/Download/CustomFieldValue/dhandler @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -61,13 +61,13 @@ unless ($OCFV->id) { Abort("Bad OCFV id. Couldn't find OCFV '$id'\n"); } -my $content_type = $OCFV->ContentType || 'text/plain'; +my $content_type = $OCFV->ContentType || 'text/plain; charset=utf-8'; if (RT->Config->Get('AlwaysDownloadAttachments')) { - $r->headers_out->{'Content-Disposition'} = "attachment; filename=" . $OCFV->Content; + $r->headers_out->{'Content-Disposition'} = "attachment"; } elsif (!RT->Config->Get('TrustHTMLAttachments')) { - $content_type = 'text/plain' if ($content_type =~ /^text\/html/i); + $content_type = 'text/plain; charset=utf-8' if ($content_type =~ /^text\/html/i); } $r->content_type( $content_type );