2

I am working with Request Tracker 4.0.15.

My installation uses getmail to attach (or create) html-emails to tickets, however, the inline images are not visible:

<div dir="ltr">

<div>text text text text text

    <br><br><img><br><br>

</div>text text text text text text<br>

But when I download the email from RT4 ticket page and open it the image is visible:

<div dir="ltr">

<div>text text text text text

    <br><br><img alt="Inline images 1" src="<<removed>>"><br><br>

</div>text text text text text text<br>

My configuration:

Set($TrustHTMLAttachments, 1);
Set($AlwaysDownloadAttachments, 1);
Set($PreferRichText, 1);
Set($ShowTransactionImages, 1);

I have also created a Web_local.pm with the content:

push @SCRUBBER_ALLOWED_TAGS, qw(A B U P BR I HR BR SMALL EM FONT SPAN STRONG SUB SUP STRIKE H1 H2 H3 H4 H5
H6 DIV UL OL LI DL DT DD PRE BLOCKQUOTE BDO IMG);

push %SCRUBBER_ALLOWED_ATTRIBUTES = (
# Match http, https, ftp, mailto and relative urls
# XXX: we also scrub format strings with this module then allow simple config options
href   => qr{^(?:https?:|ftp:|mailto:|/|__Web(?:Path|BaseURL|URL)__)}i,
face   => 1,
size   => 1,
target => 1,
src    => 1,
style  => qr{
    ^(?:\s*
        (?:(?:background-)?color: \s*
                (?:rgb\(\s* \d+, \s* \d+, \s* \d+ \s*\) |   # rgb(d,d,d)
                   \#[a-f0-9]{3,6}                      |   # #fff or #ffffff
                   [\w\-]+                                  # green, light-blue, etc.
                   )                            |
           text-align: \s* \w+                  |
           font-size: \s* [\w.\-]+              |
           font-family: \s* [\w\s"',.\-]+       |
           font-weight: \s* [\w\-]+             |

           # MS Office styles, which are probably fine.  If we don't, then any
           # associated styles in the same attribute get stripped.
           mso-[\w\-]+?: \s* [\w\s"',.\-]+
        )\s* ;? \s*)
     +$ # one or more of these allowed properties from here 'till sunset
}ix,
dir    => qr/^(rtl|ltr)$/i,
lang   => qr/^\w+(-\w+)?$/,
);
user184558
  • 23
  • 3

1 Answers1

1

You need to allow the alt attribute in %SCRUBBER_ALLOWED_ATTRIBUTES

Joe
  • 166
  • 4