From: Vsevolod Stakhov Date: Tue, 17 Aug 2021 11:19:37 +0000 (+0100) Subject: [Minor] Set invisible flag on invisible urls X-Git-Tag: 3.0~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ac1c49b2e8b92edddc73e619c266fd5f981dc32e;p=rspamd.git [Minor] Set invisible flag on invisible urls --- 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(tag->extra)) { + auto *url_enclosed = std::get(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();