Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode MIME headers for better readability in web interface. #42

Open
wants to merge 3 commits into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Decoded headers in title attribute
  • Loading branch information
petrkle committed Nov 12, 2012
commit 91e3f1062771e1b88f84b6735a5453df6465cb90
10 changes: 0 additions & 10 deletions etc/RT_Config.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -1367,16 +1367,6 @@ to the Article with that name.

=cut

Set($ShowEmailRecordRawHeaders, 0);

=item C<$ShowEmailRecordRawHeaders>

Show raw MIME headers in recorded outgoing mesages. If you want see
readable headers set this to 0. This option can be overridden by users
in their preferences.

=cut

Set($WikiImplicitLinks, 0);

=item C<$PreviewScripMessages>
Expand Down
10 changes: 0 additions & 10 deletions lib/RT/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,6 @@ our %META = (
},
},

ShowEmailRecordRawHeaders=> {
Section => 'Ticket display',
Overridable => 1,
SortOrder => 9,
Widget => '/Widgets/Form/Boolean',
WidgetArguments => {
Description => q{Show raw MIME headers in recorded outgoing mesages.}, #loc
},
},

# User overridable locale options
DateTimeFormat => {
Section => 'Locale', #loc
Expand Down
12 changes: 6 additions & 6 deletions share/html/Ticket/ShowEmailRecord.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@
my $show;
$show = sub {
my $attach = shift;
my $show_raw_headers = RT->Config->Get( 'ShowEmailRecordRawHeaders', $session{'CurrentUser'} );
$m->out( '<div id="body"><pre style="padding: 2em;">' );
$m->out( $m->interp->apply_escapes( $show_raw_headers ?
$attach->Headers : Encode::decode("MIME-Header",$attach->Headers) , 'h' ) );
$m->out( "\n\n" );

$m->out( '<div id="body"><pre style="padding: 2em;"><div title="' );
$m->out( $m->interp->apply_escapes( Encode::decode('MIME-Header',$attach->Headers) , 'h' ) );
$m->out( '">' );
$m->out( $m->interp->apply_escapes( $attach->Headers , 'h' ) );
$m->out( "</div>\n\n" );
if ( $attach->ContentType =~ m{^multipart/}i ) {
my $children = $attach->Children;
while ( my $child = $children->Next ) {
Expand Down