View original html attachment?

Is there a way to view a text/html part in its original format? When I click on “download attachment”, I get the HTML delivered to me as text/plain, which… err… impedes readability a little bit.

The situation is that I forwarded an HTML-formatted email into RT to create a ticket, but the HTML sanitizer in RT renders the content unreadable (table formatting breaks down completely), so want to view the HTML part in its original glory. Can I do this without downloading the HTML part to local disk and opening it in a browser?

-Adam Thompson

mailto:athompso@athompso.net athompso@athompso.net

(204) 291-7950 - direct

(204) 489-6515 - fax

Is there a way to view a text/html part in its original format? When I
click on “download attachment”, I get the HTML delivered to me as
text/plain, which… err… impedes readability a little bit.

The situation is that I forwarded an HTML-formatted email into RT to
create a ticket, but the HTML sanitizer in RT renders the content
unreadable (table formatting breaks down completely), so want to view
the HTML part in its original glory. Can I do this without downloading
the HTML part to local disk and opening it in a browser?

Displaying as unsanitized HTML is a security risk that allows cross-site
scripting attacks. If you really want to, you can set the option below.
From etc/RT_Config.pm:

=item C<$TrustHTMLAttachments>

If C is not defined, we will display them as
text. This prevents malicious HTML and JavaScript from being sent in a
request (although there is probably more to it than that)

=cut

Set($TrustHTMLAttachments, undef);

Thomas

Displaying as unsanitized HTML is a security risk that allows
cross-site scripting attacks. If you really want to, you can set
the option below.
From etc/RT_Config.pm:

=item C<$TrustHTMLAttachments>

If C is not defined, we will display them as
text. This prevents malicious HTML and JavaScript from being sent
in a request (although there is probably more to it than that)

=cut

Set($TrustHTMLAttachments, undef);

Thomas

That does pretty much exactly what I wanted, thank you. I misinterpreted
that option, I thought what it affected was the sanitized HTML display in
the ticket history… The description for the option makes sense, once
you remember that all HTML email is actually an unnamed MIME part, treated
as an “attachment” in the underlying mail-processing code.

I would suggest editing RT_Config.pm as so:

Always download attachments, regardless of content type. If set, this
  • overrides C.
  • overrides C. See also PreferRichText for the
  • display of HTML content in ticket history.

to make that just a little bit clearer.

Thank you for the pointer,

-Adam Thompson
athompso@athompso.net
(204) 291-7950 - direct
(204) 489-6515 - fax