aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-23 10:47:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-23 10:47:37 +0100
commit22b852043d054e18660c2478cf677a14d114309c (patch)
tree9217455f7f76a67e860f47c3fd45e46fea7bfab7
parenta52bfa87d61294bb93df3b916f008c72ae23b9c9 (diff)
downloadrspamd-22b852043d054e18660c2478cf677a14d114309c.tar.gz
rspamd-22b852043d054e18660c2478cf677a14d114309c.zip
[Minor] Fix no tags case
-rw-r--r--src/libserver/html/html.cxx5
1 files changed, 1 insertions, 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);
}