X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDownload%2FCustomFieldValue%2Fdhandler;h=069f2c00fdbfce4dde87bf98eec90b5faccd2c5e;hp=45157169c8d047138f775aee4cd274d771bf11a7;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=73a6a80a9ca5edbd43d139b7cb25bfee4abfd35e diff --git a/rt/share/html/Download/CustomFieldValue/dhandler b/rt/share/html/Download/CustomFieldValue/dhandler index 45157169c..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-2015 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"; } 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 );