diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-24 11:23:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-24 11:23:34 +0100 |
commit | f17df0a2fd2cdb2b879a8af7dc8af54b25fc7861 (patch) | |
tree | efb2c20911737d87b291ec93b773aaaf655e484a /src | |
parent | f48f00d4e8d5e10354b3880fdc1c9f3d5efc99f7 (diff) | |
download | rspamd-f17df0a2fd2cdb2b879a8af7dc8af54b25fc7861.tar.gz rspamd-f17df0a2fd2cdb2b879a8af7dc8af54b25fc7861.zip |
[Minor] Add visibility attribute support
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/html.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index 4e7e4dc23..4b7f28e9b 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -2233,6 +2233,15 @@ rspamd_html_process_style (rspamd_mempool_t *pool, struct html_block *bl, bl->font_color.d.comp.alpha = (guint8)(opacity * 255.0); } + else if (klen == 10 && + g_ascii_strncasecmp (key, "visibility", 10) == 0) { + if (p - c >= 6 && rspamd_substring_search_caseless (c, + p - c, + "hidden", 6) != -1) { + bl->visible = FALSE; + msg_debug_html ("tag is not visible"); + } + } } key = NULL; @@ -2266,8 +2275,6 @@ rspamd_html_process_block_tag (rspamd_mempool_t *pool, struct html_tag *tag, struct html_block *bl; rspamd_ftok_t fstr; GList *cur; - gdouble opacity = 1.0; - gchar numbuf[64]; cur = tag->params->head; bl = rspamd_mempool_alloc0 (pool, sizeof (*bl)); |