From ac1c49b2e8b92edddc73e619c266fd5f981dc32e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 17 Aug 2021 12:19:37 +0100 Subject: [PATCH] [Minor] Set invisible flag on invisible urls --- src/libserver/html/html.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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(); -- 2.39.5