]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Set invisible flag on invisible urls
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Aug 2021 11:19:37 +0000 (12:19 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Aug 2021 11:19:37 +0000 (12:19 +0100)
src/libserver/html/html.cxx

index 70ccd10b7475c3cb65335999fb98a7e257a2a8ce..715f831d506a4b0b7adc8512809afd4b960b6ba8 100644 (file)
@@ -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();