diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-08-17 12:19:37 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-08-17 12:19:37 +0100 |
commit | ac1c49b2e8b92edddc73e619c266fd5f981dc32e (patch) | |
tree | ef157774aa3daab1a0f1bf394fc949b90c7875d5 /src/libserver/html | |
parent | eb60784ac2d3514bba1af00750f40ce1ff74389a (diff) | |
download | rspamd-ac1c49b2e8b92edddc73e619c266fd5f981dc32e.tar.gz rspamd-ac1c49b2e8b92edddc73e619c266fd5f981dc32e.zip |
[Minor] Set invisible flag on invisible urls
Diffstat (limited to 'src/libserver/html')
-rw-r--r-- | src/libserver/html/html.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index 70ccd10b7..715f831d5 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -1236,6 +1236,20 @@ html_append_tag_content(rspamd_mempool_t *pool, } } } + else { + /* Invisible stuff */ + if (std::holds_alternative<rspamd_url *>(tag->extra)) { + auto *url_enclosed = std::get<rspamd_url *>(tag->extra); + + /* + * TODO: when hash is fixed to include flags we need to remove and add + * url to the hash set + */ + if (url_enclosed) { + url_enclosed->flags |= RSPAMD_URL_FLAG_INVISIBLE; + } + } + } calculate_final_tag_offsets(); |