From 22b852043d054e18660c2478cf677a14d114309c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 23 Jul 2021 10:47:37 +0100 Subject: [Minor] Fix no tags case --- src/libserver/html/html.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx index 6cf3b959d..0cf950531 100644 --- a/src/libserver/html/html.cxx +++ b/src/libserver/html/html.cxx @@ -1918,10 +1918,7 @@ html_process_input(rspamd_mempool_t *pool, break; } - if (!hc->all_tags.empty()) { - std::sort(hc->all_tags.begin(), hc->all_tags.end(), [](const auto &pt1, const auto &pt2) -> auto { - return pt1->tag_start < pt2->tag_start; - }); + if (!hc->all_tags.empty() && hc->root_tag) { html_append_tag_content(pool, start, end - start, hc, hc->root_tag, exceptions, url_set); } -- cgit v1.2.3