Elasticsearch 观察器 "watcher.actions.email.html.sanitization" table 属性
Elasticsearch watcher "watcher.actions.email.html.sanitization" table attributes
我使用 HTML 在 elasticsearch watcher 中构建了电子邮件警报,并且我还配置为清理 elasticsearch.yml
[= 中的以下 html 标签17=]
watcher.actions.email.html.sanitization:
allow: _tables, _blocks, _formatting, _links, _styles
但在我的警报中,我看到 table 已构建,但在构建 table 时未考虑 table 属性。例如,边框、cellpadding 和 colspan 从未应用于我的 table。 Table 下面给出示例
<table border='1' cellpadding='5' style='font-family:sans-serif;font-size:13px'><thead><tr><th>Type</th><th colspan='5'>Version</th></tr></thead><tbody> etc.
我仍然可以通过完全禁用如下所示的 HTML 清理来实现它,但不推荐这样做,因为它涉及安全风险。
watcher.actions.email.html.sanitization.enabled: false
我什至尝试过使用 allow: _tables:all
,但它没有用,而且似乎不正确。
有没有办法通过只启用几个标签及其属性来实现它?
的讨论
现在 border
和 cellpadding
属性总是被删除。您可以通过在消毒剂配置中允许 _styles
来使 style
属性正常工作。
我使用 HTML 在 elasticsearch watcher 中构建了电子邮件警报,并且我还配置为清理 elasticsearch.yml
[= 中的以下 html 标签17=]
watcher.actions.email.html.sanitization:
allow: _tables, _blocks, _formatting, _links, _styles
但在我的警报中,我看到 table 已构建,但在构建 table 时未考虑 table 属性。例如,边框、cellpadding 和 colspan 从未应用于我的 table。 Table 下面给出示例
<table border='1' cellpadding='5' style='font-family:sans-serif;font-size:13px'><thead><tr><th>Type</th><th colspan='5'>Version</th></tr></thead><tbody> etc.
我仍然可以通过完全禁用如下所示的 HTML 清理来实现它,但不推荐这样做,因为它涉及安全风险。
watcher.actions.email.html.sanitization.enabled: false
我什至尝试过使用 allow: _tables:all
,但它没有用,而且似乎不正确。
有没有办法通过只启用几个标签及其属性来实现它?
现在 border
和 cellpadding
属性总是被删除。您可以通过在消毒剂配置中允许 _styles
来使 style
属性正常工作。