AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 528976
Accepted
user184558
user184558
Asked: 2013-08-07 01:28:42 +0800 CST2013-08-07 01:28:42 +0800 CST 2013-08-07 01:28:42 +0800 CST

请求跟踪器 4 html 邮件内联图像不可见

  • 772

我正在使用 Request Tracker 4.0.15。

我的安装使用 getmail 将 html 电子邮件附加(或创建)到工单,但是,内联图像不可见:

<div dir="ltr">

<div>text text text text text

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

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

但是当我从 RT4 票务页面下载电子邮件并打开它时,图像是可见的:

<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>

我的配置:

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

我还创建了一个包含以下内容的 Web_local.pm:

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+)?$/,
);
request-tracker
  • 1 1 个回答
  • 1006 Views

1 个回答

  • Voted
  1. Best Answer
    Joe
    2013-08-07T03:04:52+08:002013-08-07T03:04:52+08:00

    您需要允许该alt属性%SCRUBBER_ALLOWED_ATTRIBUTES

    • 1

相关问题

  • RT 数据库扩展

  • 请求跟踪器将 PostgreSQL 迁移到 MySQL

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve