aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/html.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 12:04:51 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 12:04:51 +0000
commitbd9428b14979c7f06cc7871498e93f1893f1ec4f (patch)
tree738845dd0ae75ef06bb4fb3a30b695bf0516b084 /src/libserver/html.c
parent2fcc3bbac091a47444e0e33760b3cf3f96f030fa (diff)
downloadrspamd-bd9428b14979c7f06cc7871498e93f1893f1ec4f.tar.gz
rspamd-bd9428b14979c7f06cc7871498e93f1893f1ec4f.zip
Fix html images rules to reduce FP rates
Suggested by: @moisseev Issue: #525
Diffstat (limited to 'src/libserver/html.c')
-rw-r--r--src/libserver/html.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c
index 11dca2c35..07b863b2b 100644
--- a/src/libserver/html.c
+++ b/src/libserver/html.c
@@ -31,7 +31,7 @@ struct html_tag_def {
static struct html_tag_def tag_defs[] = {
/* W3C defined elements */
- {Tag_A, "a", (CM_INLINE)},
+ {Tag_A, "a", (0)},
{Tag_ABBR, "abbr", (CM_INLINE)},
{Tag_ACRONYM, "acronym", (CM_INLINE)},
{Tag_ADDRESS, "address", (CM_BLOCK)},
@@ -75,7 +75,7 @@ static struct html_tag_def tag_defs[] = {
{Tag_HR, "hr", (CM_BLOCK | CM_EMPTY)},
{Tag_HTML, "html", (CM_HTML | CM_OPT | CM_OMITST | CM_UNIQUE)},
{Tag_I, "i", (CM_INLINE)},
- {Tag_IFRAME, "iframe", (CM_INLINE)},
+ {Tag_IFRAME, "iframe", (0)},
{Tag_IMG, "img", (CM_INLINE | CM_IMG | CM_EMPTY)},
{Tag_INPUT, "input", (CM_INLINE | CM_IMG | CM_EMPTY)},
{Tag_INS, "ins", (CM_INLINE | CM_BLOCK | CM_MIXED)},
@@ -567,6 +567,7 @@ rspamd_html_tag_by_id (gint id)
struct html_tag tag;
struct html_tag_def *found;
+ tag.id = id;
/* Should work as IDs monotonically increase */
found = bsearch (&tag, tag_defs_num, G_N_ELEMENTS (tag_defs_num),
sizeof (tag_defs_num[0]), tag_find_id);